| 1 | ################### |
| 2 | ### KEYBINDINGS ### |
| 3 | ################### |
| 4 | |
| 5 | # See https://wiki.hypr.land/Configuring/Keywords/ |
| 6 | $mainMod = SUPER # Sets "Windows" key as main modifier |
| 7 | |
| 8 | # Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more |
| 9 | bind = $mainMod, Return, exec, $terminal |
| 10 | bind = $mainMod SHIFT, X, killactive, |
| 11 | bind = $mainMod SHIFT, Q, exit, |
| 12 | bind = $mainMod, F, Fullscreen |
| 13 | bind = $mainMod SHIFT, F, Fullscreen, 1 |
| 14 | # bind = $mainMod SHIFT, R, togglefloating, |
| 15 | # Smart Float: Toggle float -> Resize to 90% -> Center |
| 16 | bind = $mainMod SHIFT, R, exec, if hyprctl -j activewindow | jq -e '.floating | not'; then hyprctl --batch "dispatch togglefloating; dispatch resizeactive exact 90% 90%; dispatch centerwindow"; else hyprctl dispatch togglefloating; fi |
| 17 | bind = $mainMod, R, exec, $menu |
| 18 | bind = $mainMod SHIFT, P, pseudo, # dwindle |
| 19 | binde = $mainMod, tab, cyclenext, prev |
| 20 | bind = $mainMod, b, exec, killall waybar || waybar |
| 21 | bind = $mainMod, grave, exec, fuzzelunicode |
| 22 | bind = $mainMod, escape, exec, sysact |
| 23 | |
| 24 | # Applications |
| 25 | bind = $mainMod, W, exec, $browser |
| 26 | bind = ,PRINT, exec, hypr_screenshot.sh |
| 27 | bind = $mainMod SHIFT, P, exec, hypr_screenshot.sh |
| 28 | |
| 29 | # Music Controls |
| 30 | bind = $mainMod, m, exec, $terminal -e zsh -i -c "ncmpcpp" |
| 31 | bind = $mainMod, p, exec, mpc toggle |
| 32 | binde = $mainMod, period, exec, mpc seek +10 |
| 33 | binde = $mainMod, comma, exec, mpc seek -10 |
| 34 | bind = $mainMod SHIFT, period, exec, mpc next |
| 35 | bind = $mainMod SHIFT, comma, exec, mpc prev |
| 36 | |
| 37 | # Swap current focused window with master |
| 38 | bind = $mainMod, space, layoutmsg, swapwithmaster |
| 39 | |
| 40 | # Resize windows with h/j/k/l |
| 41 | binde = $mainMod, h, resizeactive, -30 0 |
| 42 | binde = $mainMod, l, resizeactive, 30 0 |
| 43 | binde = $mainMod, k, resizeactive, 0 -30 |
| 44 | binde = $mainMod, j, resizeactive, 0 30 |
| 45 | |
| 46 | # Switch workspaces with mainMod + [0-9] |
| 47 | bind = $mainMod, 1, split-workspace, 1 |
| 48 | bind = $mainMod, 2, split-workspace, 2 |
| 49 | bind = $mainMod, 3, split-workspace, 3 |
| 50 | bind = $mainMod, 4, split-workspace, 4 |
| 51 | bind = $mainMod, 5, split-workspace, 5 |
| 52 | bind = $mainMod, 6, split-workspace, 6 |
| 53 | bind = $mainMod, 7, split-workspace, 7 |
| 54 | bind = $mainMod, 8, split-workspace, 8 |
| 55 | bind = $mainMod, 9, split-workspace, 9 |
| 56 | bind = $mainMod, 0, split-workspace, 10 |
| 57 | |
| 58 | # Move active window to a workspace with mainMod + SHIFT + [0-9] |
| 59 | bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1 |
| 60 | bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2 |
| 61 | bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3 |
| 62 | bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4 |
| 63 | bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5 |
| 64 | bind = $mainMod SHIFT, 6, split-movetoworkspacesilent, 6 |
| 65 | bind = $mainMod SHIFT, 7, split-movetoworkspacesilent, 7 |
| 66 | bind = $mainMod SHIFT, 8, split-movetoworkspacesilent, 8 |
| 67 | bind = $mainMod SHIFT, 9, split-movetoworkspacesilent, 9 |
| 68 | bind = $mainMod SHIFT, 0, split-movetoworkspacesilent, 10 |
| 69 | |
| 70 | # Example special workspace (scratchpad) |
| 71 | bind = $mainMod, S, togglespecialworkspace, magic |
| 72 | bind = $mainMod SHIFT, S, movetoworkspace, special:magic |
| 73 | |
| 74 | # Scratchpad like DWM |
| 75 | workspace = special:h, on-created-empty: $terminal |
| 76 | bind = $mainMod SHIFT, Return, togglespecialworkspace, h |
| 77 | |
| 78 | |
| 79 | # Accessibility: Zoom |
| 80 | cursor:zoom_disable_aa = true |
| 81 | # Zoom In |
| 82 | binded = SUPER, equal, Zoom In, exec, sh -c "hyprctl keyword cursor:zoom_factor \"$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {print $2 * 1.25}')\"" |
| 83 | # Zoom Out |
| 84 | binded = SUPER, minus, Zoom Out, exec, sh -c "hyprctl keyword cursor:zoom_factor \"$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {val = $2 / 1.25; if (val < 1.0) val = 1.0; print val}')\"" |
| 85 | # Reset Zoom |
| 86 | bindld = SUPER, BACKSPACE, Reset Zoom, exec, hyprctl keyword cursor:zoom_factor 1.0 |
| 87 | |
| 88 | # Screen Rotate |
| 89 | bindld = $mainMod CTRL, comma, Rotate Screen Anti-Clockwise, exec, hypr_screen_rotate.sh +90 |
| 90 | bindld = $mainMod CTRL, period, Rotate Screen Clockwise, exec, hypr_screen_rotate.sh -90 |
| 91 | |
| 92 | # --- Hyprshade (Visual Filters) --- |
| 93 | bindd = $mainMod CTRL, S, Shader Menu, exec, hypr_shader_menu.sh |
| 94 | bindld = $mainMod CTRL, X, Disable Shader, exec, hyprshade off |
| 95 | bindld = $mainMod CTRL, V, Vibrant Shader, exec, hyprshade on vibrance |
| 96 | |
| 97 | # Scroll through existing workspaces with mainMod + scroll |
| 98 | bind = $mainMod, mouse_down, workspace, e+1 |
| 99 | bind = $mainMod, mouse_up, workspace, e-1 |
| 100 | |
| 101 | # Move/resize windows with mainMod + LMB/RMB and dragging |
| 102 | bindm = $mainMod, mouse:272, movewindow |
| 103 | bindm = $mainMod, mouse:273, resizewindow |
| 104 | |
| 105 | # Laptop multimedia keys for volume and LCD brightness |
| 106 | bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ |
| 107 | bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- |
| 108 | bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle |
| 109 | bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle |
| 110 | bindel = , XF86MonBrightnessDown, exec, ~/.local/bin/brictl - |
| 111 | bindel = , XF86MonBrightnessUp, exec, ~/.local/bin/brictl + |
| 112 | |
| 113 | |
| 114 | # Requires playerctl |
| 115 | bindl = , XF86AudioNext, exec, playerctl next |
| 116 | bindl = , XF86AudioPause, exec, playerctl play-pause |
| 117 | bindl = , XF86AudioPlay, exec, playerctl play-pause |
| 118 | bindl = , XF86AudioPrev, exec, playerctl previous |