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