| 1 | |
| 2 | # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ |
| 3 | # ┃ Keybinds ┃ |
| 4 | # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ |
| 5 | |
| 6 | source = ~/.config/hypr/config/defaults.conf |
| 7 | |
| 8 | # https://wiki.hyprland.org/Configuring/Binds/ |
| 9 | bindd = $mainMod, Q, Closes (not kill) current window, killactive, |
| 10 | bindd = $mainMod, Y, Pin current window (shows on all workspaces), pin |
| 11 | bindd = $mainMod, F, Toggles current window fullscreen mode, fullscreen |
| 12 | bindd = $mainMod, SPACE, Runs your application launcher, exec, $applauncher |
| 13 | bindd = $mainMod, J, Toggles current window split mode, togglesplit, # dwindle |
| 14 | bindd = $mainMod, RETURN, Opens your preferred terminal emulator ($terminal), exec, $terminal |
| 15 | bindd = $mainMod SHIFT, RETURN, Open terminal & attach/create tmux:main, exec, $terminal -e bash -lc 'tmux new -As main' |
| 16 | bindd = $mainMod, E, Opens your preferred filemanager ($filemanager), exec, $filemanager |
| 17 | bindd = $mainMod, V, Switches current window between floating and tiling mode, togglefloating, |
| 18 | bindd = $mainMod SHIFT, V, Open Clipboard manager, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy |
| 19 | bindd = $mainMod SHIFT, M, Exits Hyprland by terminating the user sessions, exec, loginctl terminate-user "" |
| 20 | |
| 21 | bindd = $mainMod, X, Toggles flow (disables flashy animations), exec, ~/.config/hypr/scripts/toggle-flow.sh |
| 22 | |
| 23 | ## Layouts |
| 24 | bindd = $mainMod, F10, Toggle master layout, exec, hyprctl keyword general:layout masterq |
| 25 | bindd = $mainMod, F11, Toggle dwindle layout, exec, hyprctl keyword general:layout dwindle |
| 26 | |
| 27 | bindd = , Print, Creates a screenshot of an area, exec, $shot-region$ |
| 28 | bindd = ALT, Print, Creates a screenshot of the active display, exec, $shot-screen |
| 29 | bindd = CTRL, Print, Creates a screenshot of the active window, exec, $shot-window |
| 30 | |
| 31 | # ======= Grouping Windows ======= |
| 32 | |
| 33 | bindd = $mainMod, K, Toggles current window group mode (ungroup all related), togglegroup, |
| 34 | bindd = $mainMod, Tab, Switches to the next window in the group, changegroupactive, f |
| 35 | |
| 36 | # ======= Toggle Gaps ======= |
| 37 | |
| 38 | bindd = $mainMod, G, Remove gaps between window, exec, hyprctl --batch "keyword general:gaps_out 0;keyword general:gaps_in 0" |
| 39 | bindd = $mainMod SHIFT, G, Set CachyOS default gaps, exec, hyprctl --batch "keyword general:gaps_out 5;keyword general:gaps_in 3" |
| 40 | |
| 41 | # ======= Volume Control ======= |
| 42 | |
| 43 | bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{if($1>100) system("pactl set-sink-volume @DEFAULT_SINK@ 100%")}' && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Raise Volume |
| 44 | bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Lower Volume |
| 45 | bindel = , XF86AudioMute, exec, amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob #Mutes player audio |
| 46 | |
| 47 | # ======= Playback Control ======= |
| 48 | |
| 49 | bindd = , XF86AudioPlay, Toggles play/pause, exec, playerctl play-pause |
| 50 | bindd = , XF86AudioNext, Next track, exec, playerctl next |
| 51 | bindd = , XF86AudioPrev, Previous track, exec, playerctl previous |
| 52 | |
| 53 | # ======= Screen Brightness ======= |
| 54 | |
| 55 | bindd = $mainMod, W, Reload/restarts Waybar, exec, killall -SIGUSR2 waybar |
| 56 | bindd = $mainMod, L, Lock the screen, exec, swaylock-fancy -e -K -p 10 -f Hack-Regular |
| 57 | |
| 58 | bindel = , XF86MonBrightnessUp, exec, brightnessctl s +5% #Increases brightness 5% |
| 59 | bindel = , XF86MonBrightnessDown, exec, brightnessctl s 5%- #Decreases brightness 5% |
| 60 | |
| 61 | # ======= Window Actions ======= |
| 62 | |
| 63 | ## Move window with mainMod + LMB/RMB and dragging |
| 64 | bindd = $mainMod, mouse:272, Move the window towards a direction, movewindow |
| 65 | |
| 66 | ## Move window towards a direction |
| 67 | bindd = $mainMod SHIFT, up, Move active window upwards, movewindow, u |
| 68 | bindd = $mainMod SHIFT, down, Move active window downwards, movewindow, d |
| 69 | bindd = $mainMod SHIFT, left, Move active window to the left, movewindow, l |
| 70 | bindd = $mainMod SHIFT, right, Move active window to the right, movewindow, r |
| 71 | |
| 72 | ## Move focus with mainMod + arrow keys |
| 73 | bindd = $mainMod, up, Move focus upwards, movefocus, u |
| 74 | bindd = $mainMod, down, Move focus downwards, movefocus, d |
| 75 | bindd = $mainMod, left, Move focus to the left, movefocus, l |
| 76 | bindd = $mainMod, right, Move focus to the right, movefocus, r |
| 77 | |
| 78 | ## Resizing windows |
| 79 | # Activate keyboard window resize mode |
| 80 | # https://wiki.hyprland.org/Configuring/Binds/#submaps |
| 81 | bindd = $mainMod, R, Activates window resizing mode, submap, resize |
| 82 | submap = resize |
| 83 | bindd = , right, Resize to the right (resizing mode), resizeactive, 15 0 |
| 84 | bindd = , left, Resize to the left (resizing mode), resizeactive, -15 0 |
| 85 | bindd = , up, Resize upwards (resizing mode), resizeactive, 0 -15 |
| 86 | bindd = , down, Resize downwards (resizing mode), resizeactive, 0 15 |
| 87 | bindd = , l, Resize to the right (resizing mode), resizeactive, 15 0 |
| 88 | bindd = , h, Resize to the left (resizing mode), resizeactive, -15 0 |
| 89 | bindd = , k, Resize upwards (resizing mode), resizeactive, 0 -15 |
| 90 | bindd = , j, Resize downwards (resizing mode), resizeactive, 0 15 |
| 91 | bindd = , escape, Ends window resizing mode, submap, reset |
| 92 | submap = reset |
| 93 | |
| 94 | # Quick resize window with keyboard |
| 95 | # !!! added $mainMod here because CTRL + SHIFT is used for word selection in various text editors |
| 96 | bindd = $mainMod CTRL, up, Resize upwards, resizeactive, 0 -25 |
| 97 | bindd = $mainMod CTRL, down, Resize downwards, resizeactive, 0 25 |
| 98 | bindd = $mainMod CTRL, left, Resize to the left, resizeactive, -25 0 |
| 99 | bindd = $mainMod CTRL, right, Resize to the right, resizeactive, 25 0 |
| 100 | |
| 101 | bindd = $mainMod CTRL SHIFT, up, Resize upwards, resizeactive, 0 -55 |
| 102 | bindd = $mainMod CTRL SHIFT, down, Resize downwards, resizeactive, 0 55 |
| 103 | bindd = $mainMod CTRL SHIFT, left, Resize to the left, resizeactive, -55 0 |
| 104 | bindd = $mainMod CTRL SHIFT, right, Resize to the right, resizeactive, 55 0 |
| 105 | |
| 106 | bindd = $mainMod ALT CTRL, up, Resize upwards, resizeactive, 0 -85 |
| 107 | bindd = $mainMod ALT CTRL, down, Resize downwards, resizeactive, 0 85 |
| 108 | bindd = $mainMod ALT CTRL, left, Resize to the left, resizeactive, -85 0 |
| 109 | bindd = $mainMod ALT CTRL, right, Resize to the right, resizeactive, 85 0 |
| 110 | |
| 111 | bindd = $mainMod ALT CTRL SHIFT, up, Resize upwards, resizeactive, 0 -115 |
| 112 | bindd = $mainMod ALT CTRL SHIFT, down, Resize downwards, resizeactive, 0 115 |
| 113 | bindd = $mainMod ALT CTRL SHIFT, left, Resize to the left, resizeactive, -115 0 |
| 114 | bindd = $mainMod ALT CTRL SHIFT, right, Resize to the right, resizeactive, 115 0 |
| 115 | |
| 116 | # Resize window with mainMod + LMB/RMB and dragging |
| 117 | bindm = $mainMod, mouse:273, resizewindow #Resize the window towards a direction |
| 118 | bindm = $mainMod, mouse:272, movewindow #Drag window |
| 119 | ## Resizing Windows End # |
| 120 | |
| 121 | ## Move active window to a workspace with $mainMod + CTRL + [0-9] |
| 122 | bindd = $mainMod CTRL, 1, Move window and switch to workspace 1, movetoworkspace, 1 |
| 123 | bindd = $mainMod CTRL, 2, Move window and switch to workspace 2, movetoworkspace, 2 |
| 124 | bindd = $mainMod CTRL, 3, Move window and switch to workspace 3, movetoworkspace, 3 |
| 125 | bindd = $mainMod CTRL, 4, Move window and switch to workspace 4, movetoworkspace, 4 |
| 126 | bindd = $mainMod CTRL, 5, Move window and switch to workspace 5, movetoworkspace, 5 |
| 127 | bindd = $mainMod CTRL, 6, Move window and switch to workspace 6, movetoworkspace, 6 |
| 128 | bindd = $mainMod CTRL, 7, Move window and switch to workspace 7, movetoworkspace, 7 |
| 129 | bindd = $mainMod CTRL, 8, Move window and switch to workspace 8, movetoworkspace, 8 |
| 130 | bindd = $mainMod CTRL, 9, Move window and switch to workspace 9, movetoworkspace, 9 |
| 131 | bindd = $mainMod CTRL, 0, Move window and switch to workspace 10, movetoworkspace, 10 |
| 132 | |
| 133 | bindd = $mainMod CTRL, left, Move window and switch to the next workspace, movetoworkspace, -1 |
| 134 | bindd = $mainMod CTRL, right, Move window and switch to the previous workspace, movetoworkspace, +1 |
| 135 | |
| 136 | ## Same as above, but doesn't switch to the workspace |
| 137 | bindd = $mainMod SHIFT, 1, Move window silently to workspace 1, movetoworkspacesilent, 1 |
| 138 | bindd = $mainMod SHIFT, 2, Move window silently to workspace 2, movetoworkspacesilent, 2 |
| 139 | bindd = $mainMod SHIFT, 3, Move window silently to workspace 3, movetoworkspacesilent, 3 |
| 140 | bindd = $mainMod SHIFT, 4, Move window silently to workspace 4, movetoworkspacesilent, 4 |
| 141 | bindd = $mainMod SHIFT, 5, Move window silently to workspace 5, movetoworkspacesilent, 5 |
| 142 | bindd = $mainMod SHIFT, 6, Move window silently to workspace 6, movetoworkspacesilent, 6 |
| 143 | bindd = $mainMod SHIFT, 7, Move window silently to workspace 7, movetoworkspacesilent, 7 |
| 144 | bindd = $mainMod SHIFT, 8, Move window silently to workspace 8, movetoworkspacesilent, 8 |
| 145 | bindd = $mainMod SHIFT, 9, Move window silently to workspace 9, movetoworkspacesilent, 9 |
| 146 | bindd = $mainMod SHIFT, 0, Move window silently to workspace 10, movetoworkspacesilent, 10 |
| 147 | # Window actions End # |
| 148 | |
| 149 | # ======= Workspace Actions ======= |
| 150 | |
| 151 | # Switch workspaces with mainMod + [0-9] |
| 152 | bindd = $mainMod, 1, Switch to workspace 1, workspace, 1 |
| 153 | bindd = $mainMod, 2, Switch to workspace 2, workspace, 2 |
| 154 | bindd = $mainMod, 3, Switch to workspace 3, workspace, 3 |
| 155 | bindd = $mainMod, 4, Switch to workspace 4, workspace, 4 |
| 156 | bindd = $mainMod, 5, Switch to workspace 5, workspace, 5 |
| 157 | bindd = $mainMod, 6, Switch to workspace 6, workspace, 6 |
| 158 | bindd = $mainMod, 7, Switch to workspace 7, workspace, 7 |
| 159 | bindd = $mainMod, 8, Switch to workspace 8, workspace, 8 |
| 160 | bindd = $mainMod, 9, Switch to workspace 9, workspace, 9 |
| 161 | bindd = $mainMod, 0, Switch to workspace 10, workspace, 10 |
| 162 | |
| 163 | # Scroll through existing workspaces with mainMod + , or . |
| 164 | bindd = $mainMod, COMMA, Scroll through workspaces decrementally, workspace, e-1 |
| 165 | bindd = $mainMod, PERIOD, Scroll through workspaces incrementally, workspace, e+1 |
| 166 | |
| 167 | # With $mainMod + scroll |
| 168 | bindd = $mainMod, slash, Switch to the previous workspace, workspace, previous |
| 169 | bindd = $mainMod, mouse_up, Scroll through workspaces decrementally, workspace, e-1 |
| 170 | bindd = $mainMod, mouse_down, Scroll through workspaces incrementally, workspace, e+1 |
| 171 | |
| 172 | # Special workspaces (scratchpads) |
| 173 | ## App-specific workspaces |
| 174 | bindd = $mainMod, Z, toggle zenn scratchpad, togglespecialworkspace, zenn |
| 175 | bindd = $mainMod, T, toggle scratch terminal, togglespecialworkspace, term |
| 176 | bindd = $mainMod, H, toggle guides scratchpad, togglespecialworkspace, guid |
| 177 | bindd = $mainMod, D, toggle discord scratchpad, togglespecialworkspace, disc |
| 178 | bindd = $mainMod, A, toggle audacity scratchpad, togglespecialworkspace, adct |
| 179 | bindd = $mainMod, O, toggle ticktick scratchpad, togglespecialworkspace, tick |
| 180 | bindd = $mainMod, B, toggle bitwarden scratchpad, togglespecialworkspace, bitt |
| 181 | bindd = $mainMod, M, toggle music player scratchpad, togglespecialworkspace, spot |
| 182 | bind = $mainMod, N, exec, hyprctl dispatch workspace special:notes; \ |
| 183 | hyprctl dispatch exec "$terminal -e fish -c 'viewnotes'" |
| 184 | |
| 185 | ## Scratchpad |
| 186 | bindd = $mainMod, minus, toggle default scratchpad, togglespecialworkspace, special |
| 187 | bindd = $mainMod SHIFT, minus, send window to scratchpad, movetoworkspacesilent, special |
| 188 | |
| 189 | # ======= Custom Scenes ======= |
| 190 | bindd = $mainMod ALT, 1, toggle scene 1, exec, ~/.config/hypr/scripts/scenes/scene-1.sh |
| 191 | bindd = $mainMod ALT, 2, toggle scene 2, exec, ~/.config/hypr/scripts/scenes/scene-2.sh |
| 192 | |
| 193 | |
| 194 | # ======= Additional Settings ======= |
| 195 | |
| 196 | # https://wiki.hyprland.org/Configuring/Binds |
| 197 | binds { |
| 198 | allow_workspace_cycles = 1 |
| 199 | workspace_back_and_forth = 1 |
| 200 | workspace_center_on = 1 |
| 201 | movefocus_cycles_fullscreen = true |
| 202 | window_direction_monitor_fallback = true |
| 203 | } |