summaryrefslogtreecommitdiff
path: root/dot-config/hypr/binds.conf
blob: 5dafc11b83da6e628961f25906fd5e5a9691571a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
####################
### KEYBINDINGSS ###
####################

binds {
#     allow_workspace_cycles = yes
      # movefocus_cycles_fullscreen = true
    allow_pin_fullscreen = true
	scroll_event_delay = 0
}

# See https://wiki.hyprland.org/Configuring/Keywords/
$mod = SUPER # Sets "SUPER" key as main modifier

# Launching...
bind = $mod, return, execr, $termLaunch
bind = $mod shift, return, exec, $termfloat
# bind = $mod space, return, execr, $terminal start --class pseudo
bind = $mod alt, Delete, execr, $rofiexec/rofi_powermenu
bind = alt, F1, execr, qs ipc call launcher toggle
bind = alt, F2, execr, $rofiexec/rofi_runner
bind = alt, F4, execr, $rofiexec/sgpt
# bind = $mod, period, execr, $rofiexec/rofi_emoji
bind = $mod, period, execr, qs ipc call launcher standalone Emoji
# utils
bind = $mod, c, execr, $rofiexec/rofi_configs
# bind = $mod, m, execr, $rofiexec/rofi_music
bind = $mod, n, execr, nmd
# bind = $mod, r, execr, $rofiexec/rofi_asroot
# bind = $mod, s, execr, $rofiexec/rofi_screenshot
# bind = $mod, v, execr, $rofiexec/rofi_clipboard
bind = $mod, v, execr, qs ipc call launcher standalone Clip
# bind = $mod, w, execr, $rofiexec/rofi_windows
# bind = $mod, x, execr, $rofiexec/rofi_powermenu
# bind = $mod, b, execr, $rofiexec/rofi_bluetooth
# GUI
bind = $mod shift, f, execr, $fileManager
# bind = $mod shift, w, execr, $browser --restore-last-session
bind = $mod shift, w, execr, $browser # -new-tab about:sessionrestore
bind = $mod shift, e, execr, zeditor
bind = $mod shift, d, execr, discord $waylandarg
bind = $mod shift, b, execr, beeper $waylandarg --default-frame --enable-wayland-ime
# CLI
bind = ctrl alt, a, exec, $termfloat --title=pulsemixer -e pulsemixer
bind = ctrl alt, r, exec, $termfloat --title=ranger -e ranger
bind = ctrl alt, v, exec, $termfloat -e $editor

# Emergency
bindtp = ctrl alt, b, exec, $termfloat --title=btop -e sudo nice -n -20 ionice -c 1 sudo btop
bindtp = ctrl alt, delete, execr, $rofiexec/rofi_shutdown_menu
bindtp = ctrl shift, escape, execr, missioncenter

# Misc
# bind = ctrl alt, m, execr, music
bind = $mod, p, execr, hyprpicker --autocopy
bindtp = ctrl alt, l, execr, loginctl lock-session
# Misc
bind = $mod shift, g, execr, gtk-launch shortwave.desktop
# bind = $mod shift, c, execr, gtk-launch google-chat.desktop

# XF86 keys & Misc
bind = ,XF86Print, execr, pidof slurp || $HOME/scripts/sysutil.sh screenshot --now
bind = $mod shift, s, execr, $HOME/scripts/sysutil.sh screenshot --area

# Volume
binde = ,XF86AudioRaiseVolume, execr, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 & wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && pw-play /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
binde = ,XF86AudioLowerVolume, execr, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 & wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && pw-play /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
bind = ,XF86AudioMute, execr, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && pw-play /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
bind = ,XF86AudioMicMute, execr, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = ,XF86AudioNext, execr, playerctl position 5+
bindo = ,XF86AudioNext, execr, playerctl -p spotify next
bind = ,XF86AudioPrev, execr, playerctl position 5-
bindo = ,XF86AudioPrev, execr, playerctl -p spotify previous
bindl = ,XF86AudioPlay, exec, [workspace 7 silent; noinitialfocus] playerctl -p spotify play-pause || LD_PRELOAD=/usr/lib64/spotify-adblock.so spotify
bindol = ,XF86AudioPlay, exec, [workspace 7 silent; noinitialfocus] playerctl --all-players pause || LD_PRELOAD=/usr/lib64/spotify-adblock.so spotify
bind = ,XF86AudioStop, execr, playerctl -p spotify stop
bind = ,XF86PowerOff, execr, $rofiexec/rofi_shutdown

# Pause
bind = $mod, Pause, execr, hyprfreeze -s -a

# Print
bind = ,Print, execr, $HOME/scripts/hyprshot --now

# Brightness
binde = ,XF86MonBrightnessUp, execr, $HOME/scripts/sysutil.sh brightness --inc
binde = ,XF86MonBrightnessDown, execr, $HOME/scripts/sysutil.sh brightness --dec
# binde = ,XF86MonBrightnessUp, execr, hyprctl hyprsunset gamma +5  
# binde = ,XF86MonBrightnessDown, execr, hyprctl hyprsunset gamma -5

# Window management
# bind = $mod, d, execr, $HOME/scripts/hyprhide h
# bind = $mod, i, execr, $HOME/scripts/hyprhide s
bind = $mod, d, execr, hyprctl dispatch movetoworkspacesilent special:minimized
bind = $mod, i, togglespecialworkspace, minimized
bind = $mod, i, execr, hyprctl dispatch movetoworkspace +0
binde = $mod, q, killactive
bind = $mod shift, q, execr, kill -9 $(hyprctl activewindow | grep pid | tail -1 | awk '{print$2}')
bind = ctrl alt, escape, execr, hyprctl kill
bind = ctrl $mod shift, r, execr, hyprctl reload
# restart bar
# bind = ctrl $mod, escape, execr, killall -SIGUSR2 waybar || waybar &
bind = ctrl $mod, escape, execr, qs ipc call qs reload false || qs &
# reload wall
bind = $mod alt, b, execr, killall wallust $bgChangerBin $bgChanger; $bgChangerBin
# bind = ctrl, up, hyprexpo:expo, on
# bind = ctrl, down, hyprexpo:expo, off
# bind = ctrl $mod alt, up, overview:open
bind = ctrl $mod alt, up, scroller:jump
# bind = ctrl $mod alt, down, overview:close
# bind = alt, tab, execr, hyprswitch gui
# bind = alt, grave, execr, hyprswitch gui --reverse
# bindr = alt, tab, execr, hyprswitch close
# bindr = alt, grave, execr, hyprswitch close
bind = alt, tab, execr, hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch
bind = alt, grave, execr, hyprswitch gui --mod-key alt_l --key tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch -r

binde = ctrl alt, left, workspace, -1
binde = ctrl alt, right, workspace, +1
binde = $mod shift, h, movewindow, l
binde = $mod shift, l, movewindow, r
binde = $mod shift, k, movewindow, u
binde = $mod shift, j, movewindow, d
# binde = $mod shift, h, scroller:movewindow, l
# binde = $mod shift, l, scroller:movewindow, r
# binde = $mod shift, k, scroller:movewindow, u
# binde = $mod shift, j, scroller:movewindow, d
# binde = ctrl shift, left, resizeactive, -20 0
# binde = ctrl shift, left, moveactive, 20 0
# binde = ctrl shift, right, resizeactive, -20 0
# binde = ctrl shift, up, resizeactive, 0 -20
# binde = ctrl shift, up, moveactive, 0 20
# binde = ctrl shift, down, resizeactive, 0 -20
# binde = ctrl $mod, left, resizeactive, 20 0
# binde = ctrl $mod, left, moveactive, -20 0
# binde = ctrl $mod, right, resizeactive, 20 0
# binde = ctrl $mod, up, resizeactive, 0 20
# binde = ctrl $mod, up, moveactive, 0 -20
# binde = ctrl $mod, down, resizeactive, 0 20
# binde = ctrl $mod alt, space, setfloating, 1
# binde = ctrl $mod alt, space, centerwindow, 1
binde = ctrl $mod alt, space, scroller:setheight, one
binde = ctrl $mod alt, space, scroller:setwidth, one
# binde = shift alt, left, moveactive, -20 0
# binde = shift alt, right, moveactive, 20 0
# binde = shift alt, up, moveactive, 0 -20
# binde = shift alt, down, moveactive, 0 20
# binde = ctrl $mod shift, h, scroller:movewindow, l
# binde = ctrl $mod shift, h, scroller:setsize, onehalf
# binde = ctrl $mod shift, h, scroller:movewindow, r
# binde = ctrl $mod shift, h, scroller:movefocus, l
# binde = ctrl $mod shift, h, scroller:movefocus, r
# binde = ctrl $mod shift, l, scroller:setsize, onehalf
binde = ctrl $mod shift, l, scroller:cyclewidth, next
binde = ctrl $mod shift, h, scroller:cyclewidth, prev

binde = ctrl $mod shift, j, scroller:cycleheight, next
binde = ctrl $mod shift, k, scroller:cycleheight, prev

binde = $mod ctrl, h, scroller:admitwindow, l
binde = $mod ctrl, l, scroller:admitwindow, r
binde = $mod alt, h, scroller:expelwindow, r
binde = $mod alt, l, scroller:expelwindow, l

bind = $mod, home, scroller:movefocus, begin
bind = $mod, end, scroller:movefocus, end

# zoom
# bind = $mod, equal, execr, /bin/bash -c "hyprctl keyword cursor:zoom_factor $(($(hyprctl getoption cursor:zoom_factor | awk '/float/ {print $2}')+0.1))"

bind = $mod, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')
bind = $mod, mouse_up, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')
binde = $mod, equal, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')
binde = $mod, minus, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')
bind = $mod shift, minus, exec, hyprctl -q keyword cursor:zoom_factor 1
bind = $mod shift, equal, exec, hyprctl -q keyword cursor:zoom_factor 1
bind = $mod shift, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor 1
bind = $mod shift, mouse_up, exec, hyprctl -q keyword cursor:zoom_factor 1

# spotify lyrics ig
bind = $mod shift, u, execr, $SCRIPTSDIR/togglespot.sh

# window shortcuts
bind = $mod, f, fullscreen
bind = ctrl alt, f, fullscreen, 1
bind = $mod, space, togglefloating,
bind = $mod shift, space, pseudo, # dwindle
bind = $mod shift, m, togglesplit, # dwindle
bind = $mod, s, pin

# Move focus with mainMod + arrow keys
binde = $mod, h, movefocus, l
binde = $mod, l, movefocus, r
binde = $mod, k, movefocus, u
binde = $mod, j, movefocus, d
bind = ctrl $mod, k, focuswindow, floating
bind = ctrl $mod, j, focuswindow, tiled
# vim binds
# binde = $mod, h, scroller:movefocus, l
# binde = $mod, l, scroller:movefocus, r
# binde = $mod, k, scroller:movefocus, u
# binde = $mod, j, scroller:movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspacesilent, 10

# Scroll through existing workspaces with mainMod + scroll
# use waybar
# bind = $mod, mouse_down, workspace, e+1
# bind = $mod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow 0

# bind = $mod, mouse_up, scroller:movefocus, r
# bind = $mod, mouse_down, scroller:movefocus, l
# bindm = $mod, mouse_down, resizewindow 0

# bind = $mod, mouse:272, pin
# bindri = $mod, mouse:272, pin, disable


bindi = ,mouse:276, execr, exec -a autoclicker-left zsh -c 'while true; do wlrctl pointer click; sleep $((0.$RANDOM/10)); done'
bindi = ,mouse:275, execr, exec -a autoclicker-right zsh -c 'while true; do wlrctl pointer click right; sleep $((0.$RANDOM/10)); done'
bindri = ,mouse:276, execr, kill $(pgrep -f autoclicker-left)
bindri = ,mouse:275, execr, kill $(pgrep -f autoclicker-right)

# Make group
# bind = $mod, g, togglegroup

# bindie = ,mouse:276, execr, wlrctl pointer click
# bindie = ,mouse:275, execr, wlrctl pointer click right
# bindri = ,mouse:276, execr, kill $(pgrep -f autoclicker-left)
# bindri = ,mouse:275, execr, kill $(pgrep -f autoclicker-right)

# chroma
# bind = $mod, O, togglechromakey

# input capture
# bind = $mod SHIFT, escape, releaseinputcapture
#
windowrule = opacity 0.9999, class:zen