From df1bdd580859c50e7938bb02edda5eacfda6b202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 25 Sep 2024 18:51:04 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(hypr):=20keybinds?= =?UTF-8?q?=20config=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/hypr/configs/binds.conf | 189 ++++++++++++++++---------------- 1 file changed, 97 insertions(+), 92 deletions(-) diff --git a/.config/hypr/configs/binds.conf b/.config/hypr/configs/binds.conf index 8a4cefcc..8ce01f87 100644 --- a/.config/hypr/configs/binds.conf +++ b/.config/hypr/configs/binds.conf @@ -1,24 +1,10 @@ -# Variables source = ~/.config/hypr/configs/default_apps.conf +# Variables $mainMod = SUPER $scripts = ~/.config/hypr/scripts $rofi-scripts = ~/.config/rofi/scripts -# Mouse binds -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Basic keybinds -bind = $mainMod, Q, killactive, -bind = $mainMod CTRL, R, exec, killall $bar; $bar -bind = $mainMod CTRL, T, exec, killall -SIGUSR1 $bar -bind = $mainMod SHIFT, R, exec, swaync -R && swaync -rs -bind = $mainMod, A, exec, $scripts/toggle_floating -bind = $mainMod, P, pseudo -bind = $mainMod, F, fullscreen, 0 -bind = $mainMod, Z, exec, pypr zoom - # Applications bind = $mainMod, W, exec, $scripts/launch_app $browser bind = $mainMod, O, exec, $scripts/launch_app $notetaking-app @@ -31,15 +17,30 @@ bind = $mainMod ALT, RETURN, exec, $terminal --class=center-float-mini bind = $mainMod, BACKSPACE, exec, $scripts/launch_app $editor bind = $mainMod SHIFT, BACKSPACE, exec, $scripts/launch_app $alter-editor +## Notifications Menu +bind = $mainMod, N, exec, $notifications-menu +bind = $mainMod SHIFT, R, exec, swaync -R && swaync -rs + +## Bar +bind = $mainMod CTRL, R, exec, killall $bar; $bar +bind = $mainMod CTRL, T, exec, killall -SIGUSR1 $bar + # Pickers/Launchers bind = $mainMod, 23, exec, $launcher # Tab bind = $mainMod, INSERT, exec, $scripts/color_picker bind = $mainMod SHIFT, W, exec, $rofi-scripts/wallpaper/wallpaper bind = $mainMod, 61, exec, $rofi-scripts/keybindings/keybindings # / bind = $mainMod SHIFT, G, exec, rofi -modi games -show games -theme $rofi-scripts/game-launcher/style +bind = $mainMod SHIFT, V, exec, $rofi-scripts/wireguard/wireguard_selection menu +bind = $mainMod, ESCAPE, exec, $rofi-scripts/powermenu/powermenu bind = $mainMod, Y, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy -# Scratchpads +## Screenshots +bind = CTRL, ESCAPE, exec, $rofi-scripts/screenshot/screenshot +bind = SHIFT, ESCAPE, exec, $rofi-scripts/screenshot/screenshot --freeze + +# Pyprland +## Scratchpad Module bind = $mainMod, V, exec, pypr toggle volume bind = $mainMod, 51, exec, pypr toggle terminal # Backslash bind = $mainMod, T, exec, pypr toggle btop @@ -49,102 +50,54 @@ bind = $mainMod SHIFT, B, exec, pypr toggle bluetooth bind = $mainMod, E, exec, pypr toggle yazi bind = $mainMod, D, exec, pypr toggle dots -# Screenshots -bind = CTRL, ESCAPE, exec, $rofi-scripts/screenshot/screenshot -bind = SHIFT, ESCAPE, exec, $rofi-scripts/screenshot/screenshot --freeze - -# Misc stuff +## Other Modules +bind = $mainMod, Z, exec, pypr zoom bind = $mainMod CTRL, W, exec, pypr wall next -# Notifications menu -bind = $mainMod, N, exec, $notifications-menu - -# Logout menu -bind = $mainMod, ESCAPE, exec, $rofi-scripts/powermenu/powermenu - # Windows -# Focusing on windows +## Basic Operations +bind = $mainMod, Q, killactive, +bind = $mainMod, A, exec, $scripts/toggle_floating +bind = $mainMod, P, pseudo +bind = $mainMod, F, fullscreen, 0 + +## Mouse +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +## Focusing bind = $mainMod, LEFT, movefocus, l bind = $mainMod, RIGHT, movefocus, r bind = $mainMod, UP, movefocus, u bind = $mainMod, DOWN, movefocus, d -# Vim-keybinds +### Vim-keybinds bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r bind = $mainMod, K, movefocus, u bind = $mainMod, J, movefocus, d -# Moving windows +## Moving bind = $mainMod SHIFT, LEFT, movewindow, l bind = $mainMod SHIFT, RIGHT, movewindow, r bind = $mainMod SHIFT, UP, movewindow, u bind = $mainMod SHIFT, DOWN, movewindow, d -# Vim-keybinds +bind = $mainMod SHIFT, 51, exec, $scripts/move_by_rules # Backslash +### Vim-keybinds bind = $mainMod SHIFT, H, movewindow, l bind = $mainMod SHIFT, L, movewindow, r bind = $mainMod SHIFT, K, movewindow, u bind = $mainMod SHIFT, J, movewindow, d -bind = $mainMod SHIFT, 51, exec, $scripts/move_by_rules # Backslash -# Center and split +## Center and Split bind = $mainMod, S, togglesplit bind = $mainMod, C, exec, hyprctl dispatch centerwindow 1 -# Workspaces -# Focusing other workspaces -bind = $mainMod, 1, workspace, r~1 -bind = $mainMod, 2, workspace, r~2 -bind = $mainMod, 3, workspace, r~3 -bind = $mainMod, 4, workspace, r~4 -bind = $mainMod, 5, workspace, r~5 -bind = $mainMod, 6, workspace, r~6 -bind = $mainMod, 7, workspace, r~7 -bind = $mainMod, 8, workspace, r~8 -bind = $mainMod, 9, workspace, r~9 - -# Moving windows to other workspaces -bind = $mainMod SHIFT, 1, movetoworkspace, r~1 -bind = $mainMod SHIFT, 2, movetoworkspace, r~2 -bind = $mainMod SHIFT, 3, movetoworkspace, r~3 -bind = $mainMod SHIFT, 4, movetoworkspace, r~4 -bind = $mainMod SHIFT, 5, movetoworkspace, r~5 -bind = $mainMod SHIFT, 6, movetoworkspace, r~6 -bind = $mainMod SHIFT, 7, movetoworkspace, r~7 -bind = $mainMod SHIFT, 8, movetoworkspace, r~8 -bind = $mainMod SHIFT, 9, movetoworkspace, r~9 - -# Moving windows to other workspaces (silent) -bind = $mainMod ALT, 1, movetoworkspacesilent, r~1 -bind = $mainMod ALT, 2, movetoworkspacesilent, r~2 -bind = $mainMod ALT, 3, movetoworkspacesilent, r~3 -bind = $mainMod ALT, 4, movetoworkspacesilent, r~4 -bind = $mainMod ALT, 5, movetoworkspacesilent, r~5 -bind = $mainMod ALT, 6, movetoworkspacesilent, r~6 -bind = $mainMod ALT, 7, movetoworkspacesilent, r~7 -bind = $mainMod ALT, 8, movetoworkspacesilent, r~8 -bind = $mainMod ALT, 9, movetoworkspacesilent, r~9 - -# Moving to other workspace with mouse control -bind = $mainMod, mouse_down, workspace, m-1 -bind = $mainMod, mouse_up, workspace, m+1 - -# Moving to other workspace with keyboard -bind = $mainMod CTRL, LEFT, workspace, m-1 -bind = $mainMod CTRL, RIGHT, workspace, m+1 - -bind = $mainMod CTRL, H, workspace, m-1 -bind = $mainMod CTRL, L, workspace, m+1 - -# Moving to next and prev monitors -bind = $mainMod, 59, focusmonitor, -1 # Comma -bind = $mainMod, 60, focusmonitor, +1 # Period - -# Group control +## Group Control bind = $mainMod, G, togglegroup bind = $mainMod CTRL, G, lockactivegroup, toggle bind = ALT, TAB, changegroupactive -# Submap for resizing windows +## Resizing Windows bind = $mainMod, R, submap, resize submap = resize @@ -162,7 +115,58 @@ bind = , ESCAPE, submap, reset submap = reset -# Audio +# Workspaces +## Focusing other Workspaces +bind = $mainMod, 1, workspace, r~1 +bind = $mainMod, 2, workspace, r~2 +bind = $mainMod, 3, workspace, r~3 +bind = $mainMod, 4, workspace, r~4 +bind = $mainMod, 5, workspace, r~5 +bind = $mainMod, 6, workspace, r~6 +bind = $mainMod, 7, workspace, r~7 +bind = $mainMod, 8, workspace, r~8 +bind = $mainMod, 9, workspace, r~9 + +## Moving Windows to other Workspaces +bind = $mainMod SHIFT, 1, movetoworkspace, r~1 +bind = $mainMod SHIFT, 2, movetoworkspace, r~2 +bind = $mainMod SHIFT, 3, movetoworkspace, r~3 +bind = $mainMod SHIFT, 4, movetoworkspace, r~4 +bind = $mainMod SHIFT, 5, movetoworkspace, r~5 +bind = $mainMod SHIFT, 6, movetoworkspace, r~6 +bind = $mainMod SHIFT, 7, movetoworkspace, r~7 +bind = $mainMod SHIFT, 8, movetoworkspace, r~8 +bind = $mainMod SHIFT, 9, movetoworkspace, r~9 + +## Moving Windows to other Workspaces (Silent) +bind = $mainMod ALT, 1, movetoworkspacesilent, r~1 +bind = $mainMod ALT, 2, movetoworkspacesilent, r~2 +bind = $mainMod ALT, 3, movetoworkspacesilent, r~3 +bind = $mainMod ALT, 4, movetoworkspacesilent, r~4 +bind = $mainMod ALT, 5, movetoworkspacesilent, r~5 +bind = $mainMod ALT, 6, movetoworkspacesilent, r~6 +bind = $mainMod ALT, 7, movetoworkspacesilent, r~7 +bind = $mainMod ALT, 8, movetoworkspacesilent, r~8 +bind = $mainMod ALT, 9, movetoworkspacesilent, r~9 + +## Moving to other Workspace with Mouse Control +bind = $mainMod, mouse_down, workspace, m-1 +bind = $mainMod, mouse_up, workspace, m+1 + +## Moving to other Workspace with Keyboard +bind = $mainMod CTRL, LEFT, workspace, m-1 +bind = $mainMod CTRL, RIGHT, workspace, m+1 + +bind = $mainMod CTRL, H, workspace, m-1 +bind = $mainMod CTRL, L, workspace, m+1 + +# Monitors +## Moving to Next and Prev Monitors +bind = $mainMod, 59, focusmonitor, -1 # Comma +bind = $mainMod, 60, focusmonitor, +1 # Period + +# Media +## Audio bind = $mainMod CTRL, V, exec, ~/.local/bin/restartAudio bindl = $mainMod CTRL, mouse:280, exec, swayosd-client --output-volume mute-toggle # Extra Up Button @@ -171,6 +175,7 @@ bindl = $mainMod CTRL, mouse:281, exec, swayosd-client --input-volume mute-toggl bindl = , XF86AudioMicMute, exec, exec swayosd-client --input-volume mute-toggle bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPause, exec, playerctl play-pause bindl = $mainMod CTRL, mouse:282, exec, playerctl play-pause # Extra Center Button bindl = , XF86AudioPrev, exec, playerctl previous bindl = $mainMod CTRL, mouse:275, exec, playerctl previous # Extra Back Button @@ -187,16 +192,16 @@ bindle = $mainMod SHIFT, 21, exec, swayosd-client --input-volume raise # Minus k bindle = , XF86InputLowerVolume, exec, swayosd-client --input-volume lower bindle = $mainMod SHIFT, 20, exec, swayosd-client --input-volume lower # Plus key -# Brightness +## Brightness bindle = , XF86MonBrightnessUp, exec, swayosd-client --brightness +10 bindle = , XF86MonBrightnessDown, exec, swayosd-client --brightness -10 -# Disable anim, blur, etc +# Other +## Disable anim, blur, etc bind = $mainMod, F12, exec, $scripts/performance -# Open Wiki -bind = $mainMod, F1, exec, xdg-open https://wiki.hyprland.org/ -bind = $mainMod SHIFT, F1, exec, xdg-open https://github.com/Matt-FTW/dotfiles/wiki - -# Freeze active window +## Freeze active window bind = $mainMod SHIFT, ESCAPE, exec, $scripts/hyprfreeze -a + +## Open Wikis +bind = $mainMod, F1, exec, xdg-open https://wiki.hyprland.org/