From e167d883a060f6b80231aeb3e8ec6229daf1a68b Mon Sep 17 00:00:00 2001 From: js0ny Date: Thu, 17 Apr 2025 18:49:47 +0100 Subject: [PATCH] feat(hypr): Resize and resize submap --- platforms/linux/hypr/hyprland.conf | 24 ++++++++++++++----- platforms/linux/hypr/hyprland/+colemak.conf | 25 ++++++++++++++++++++ platforms/linux/hypr/hyprland/+qwerty.conf | 24 +++++++++++++++++++ platforms/linux/hypr/hyprland/keymaps.conf | 26 +++++++++++++++++++++ platforms/linux/hypr/hyprland/rules.conf | 4 ++++ 5 files changed, 97 insertions(+), 6 deletions(-) diff --git a/platforms/linux/hypr/hyprland.conf b/platforms/linux/hypr/hyprland.conf index b2814e5..791a8bb 100644 --- a/platforms/linux/hypr/hyprland.conf +++ b/platforms/linux/hypr/hyprland.conf @@ -132,7 +132,7 @@ general { layout = dwindle - no_border_on_floating = true + no_border_on_floating = false } # https://wiki.hyprland.org/Configuring/Variables/#decoration @@ -140,8 +140,10 @@ decoration { rounding = 0 # Change transparency of focused and unfocused windows - active_opacity = 1 - inactive_opacity = 0.9 + # active_opacity = 1 + # inactive_opacity = 0.9 + active_opacity = 0.9 + inactive_opacity = 0.85 shadow { enabled = true @@ -187,8 +189,8 @@ animations { animation = fadeLayersIn, 1, 1.79, almostLinear animation = fadeLayersOut, 1, 1.39, almostLinear animation = workspaces, 1, 1.94, almostLinear, slide - animation = workspacesIn, 1, 1.21, almostLinear, slide - animation = workspacesOut, 1, 1.94, almostLinear, slide + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade animation = specialWorkspace, 1, 1.94, almostLinear, fade } @@ -201,7 +203,7 @@ dwindle { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { - new_status = master + new_status = slave } # https://wiki.hyprland.org/Configuring/Variables/#misc @@ -244,3 +246,13 @@ gestures { # sensitivity = -0.5 # } +windowrulev2 = opaque, workspace:2 + +windowrulev2 = float, workspace:10 +windowrulev2 = opacity 0.95 0.4 0.7, workspace:10 +windowrulev2 = bordersize 3, workspace:10 +windowrulev2 = xray, workspace:10 +windowrulev2 = noblur, workspace:10 +bind = $mainMod SHIFT, BACKSLASH, togglegroup +bind = $mainMod, BACKSLASH, changegroupactive, f +bind = $mainMod, BRACKETRIGHT, exec, notify-send "$(hyprctl activewindow)" diff --git a/platforms/linux/hypr/hyprland/+colemak.conf b/platforms/linux/hypr/hyprland/+colemak.conf index 77a1407..d03a30f 100644 --- a/platforms/linux/hypr/hyprland/+colemak.conf +++ b/platforms/linux/hypr/hyprland/+colemak.conf @@ -8,3 +8,28 @@ bind = $mainMod SHIFT, E, swapwindow, u bind = $mainMod SHIFT, N, swapwindow, d bind = $mainMod, F, exec, $fileManager +bind = $mainMod CTRL, i, resizeactive, 10 0 +bind = $mainMod CTRL, h, resizeactive, -10 0 +bind = $mainMod CTRL, e, resizeactive, 0 -10 +bind = $mainMod CTRL, n, resizeactive, 0 10 + +submap = resize + +binde = , right, resizeactive, 10 0 +binde = , left, resizeactive, -10 0 +binde = , up, resizeactive, 0 -10 +binde = , down, resizeactive, 0 10 + +binde = , i, resizeactive, 10 0 +binde = , h, resizeactive, -10 0 +binde = , e, resizeactive, 0 -10 +binde = , n, resizeactive, 0 10 + +binde = SHIFT, I, resizeactive, 40 0 +binde = SHIFT, H, resizeactive, -40 0 +binde = SHIFT, E, resizeactive, 0 -40 +binde = SHIFT, N, resizeactive, 0 40 + +bind = , escape, submap, reset + +submap = reset diff --git a/platforms/linux/hypr/hyprland/+qwerty.conf b/platforms/linux/hypr/hyprland/+qwerty.conf index 9f51a6b..0b86be7 100644 --- a/platforms/linux/hypr/hyprland/+qwerty.conf +++ b/platforms/linux/hypr/hyprland/+qwerty.conf @@ -8,4 +8,28 @@ bind = $mainMod SHIFT, K, swapwindow, u bind = $mainMod SHIFT, J, swapwindow, d bind = $mainMod, E, exec, $fileManager +bind = $mainMod CTRL, l, resizeactive, 10 0 +bind = $mainMod CTRL, h, resizeactive, -10 0 +bind = $mainMod CTRL, k, resizeactive, 0 -10 +bind = $mainMod CTRL, j, resizeactive, 0 10 +submap = resize + +binde = , right, resizeactive, 10 0 +binde = , left, resizeactive, -10 0 +binde = , up, resizeactive, 0 -10 +binde = , down, resizeactive, 0 10 + +binde = , l, resizeactive, 10 0 +binde = , h, resizeactive, -10 0 +binde = , k, resizeactive, 0 -10 +binde = , j, resizeactive, 0 10 + +binde = SHIFT, L, resizeactive, 40 0 +binde = SHIFT, H, resizeactive, -40 0 +binde = SHIFT, K, resizeactive, 0 -40 +binde = SHIFT, J, resizeactive, 0 40 + +bind = , escape, submap, reset + +submap = reset diff --git a/platforms/linux/hypr/hyprland/keymaps.conf b/platforms/linux/hypr/hyprland/keymaps.conf index 44e497f..9e8ea2f 100644 --- a/platforms/linux/hypr/hyprland/keymaps.conf +++ b/platforms/linux/hypr/hyprland/keymaps.conf @@ -10,6 +10,11 @@ bind = $mainMod, Page_Up, fullscreen bind = ALT, Tab, cyclenext, # change focus to another window bind = ALT SHIFT, Tab, cyclenext,prev # change focus to another window +## Submaps + + +bind = $mainMod SHIFT, R, submap, resize +bind = $mainMod, A, submap, apps ## Launcher @@ -18,6 +23,7 @@ bind = $mainMod, V, exec, cliphist list | $menu -dmenu | cliphist decode | wl-co bind = $mainMod, D, exec, $HOME/.local/scripts/picker/sdcv.sh bind = alt, space, exec, $menu -show drun -icon-theme $iconTheme -show-icons bind = $mainMod, SLASH, exec, $HOME/.local/scripts/picker/baloo.sh +bind = $mainMod SHIFT, SLASH, exec, $HOME/.local/scripts/picker/keybinds.sh bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, X, togglesplit, # dwindle @@ -83,3 +89,23 @@ bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous + +# Submaps + + +# submap = apps +# +# binde = , a, exec, cherry-studio # AI +# binde = , c, exec, code # VSCode +# binde = , d, exec, dolphin +# binde = , e, exec, emacs +# binde = , f, exec, firefox +# binde = , g, exec, gimp +# binde = , o, exec, obsidian +# binde = , v, exec, vivaldi +# binde = SHIFT, v, exec, neovide +# +# +# bind = , escape, submap, reset +# +# submap = reset diff --git a/platforms/linux/hypr/hyprland/rules.conf b/platforms/linux/hypr/hyprland/rules.conf index 8d014f5..9fb37ab 100644 --- a/platforms/linux/hypr/hyprland/rules.conf +++ b/platforms/linux/hypr/hyprland/rules.conf @@ -76,3 +76,7 @@ windowrulev2 = size 50%, title:^(预览)(.*)$ windowrulev2 = center, title:^(图片查看器)(.*)$ windowrulev2 = float, title:^(图片查看器)(.*)$ windowrulev2 = size 50%, title:^(图片查看器)(.*)$ + +# Pin: Rofi will display in all wsps +windowrulev2 = pin, class:^(Rofi)$ +windowrulev2 = stayfocused, class:^(Rofi)$