-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsxhkdrc
222 lines (160 loc) · 5.39 KB
/
sxhkdrc
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
# __________________________________________________________
#
# __ __ _ ___
# / /_____ __ __/ /_ (_)___ ____/ (_)___ ____ ______
# / //_/ _ \/ / / / __ \/ / __ \/ __ / / __ \/ __ `/ ___/
# / ,< / __/ /_/ / /_/ / / / / / /_/ / / / / / /_/ (__ )
# /_/|_|\___/\__, /_.___/_/_/ /_/\__,_/_/_/ /_/\__, /____/
# /____/ /____/
#
# __________________________________________________________
#
# by @hcpsilva
#
#
# hey, have a look at the rest of my dotfiles also!
#
# https://git.sr.ht/~hcpsilva/dotfiles
#
#
# keybinding related to the window-manager:
#
# window movement --------------------------------------------------------------
# change the window in focus or move it
super + {_,shift} {h,j,k,l}
i3-msg -q {focus,move} {left,down,up,right}
# move either focus or window to desired workspace
super + {_,ctrl} + {1-8}
i3-msg -q {_,move container to} workspace {1-8}
# move window and move to selected workspace
super + shift + {1-8}
WSP='{1-8}'; i3-msg -q "move container to workspace $WSP; workspace $WSP"
# window resizing --------------------------------------------------------------
#+chord: resize
super + r : {h,j,k,l}
i3-msg -q resize {shrink width,grow height,shrink height,grow width} 5 px or 5 ppt
# make the window in focus fullscreen
super + f
i3-msg -q fullscreen toggle
super + shift + f
i3-msg -q 'focus parent; fullscreen; focus child'
# cycling ----------------------------------------------------------------------
# cycle between all workspaces
super + ctrl + bracket{left,right}
i3-msg -q workspace {prev,next}
# cycle between non-empty workspaces
super + b
i3-msg -q workspace back_and_forth
# same as before but take the window in focus with you
super + shift + b
WSP='back_and_forth'; i3-msg -q "move container to workspace $WSP; workspace $WSP"
# floats -----------------------------------------------------------------------
# make the window in focus floating
super + shift + space
i3-msg -q floating toggle
# change the focus between floating and tiling windows
super + space
i3-msg -q focus mode_toggle
# show windows in scratchpad (cycle through them)
super + minus
i3-msg -q scratchpad show
# move window in focus to scratchpad
super + shift + minus
i3-msg -q move scratchpad
# layout -----------------------------------------------------------------------
# change new window tiling
super + ctrl + {h,v,q}
i3-msg -q split {h,v,toggle}
# change the window layout
super + {s,w,e}
i3-msg -q layout {stacking,tabbed,toggle split}
# others -----------------------------------------------------------------------
# either reload the config or restart i3
super + shift + {c,r}
i3-msg -q {reload,restart}
#
# keybindings related to the start of any application:
#
# opens a floating rofi window to either open new stuff or to change the current window
super + {d,x,y,c}
rofi -show {drun,window,run,calc -no-show-match -no-sort}
# opens a simple terminal window running zsh
super + Return
$TERMINAL
# kill the window in focus
super + shift + q
i3-msg -q kill window
# kills the window you point to
super + ctrl + x
xkill
#
# keybindings that are really just shortcuts
#
# opens thunderbird, the email client
super + F1
thunderbird
# opens the browser
super + F2
firefox
# opens ranger, the file browser
super + F3
gtk-launch ranger
# opens emacs
super + F4
emacsclient -c
# opens ncmpcpp
super + F5
gtk-launch ncmpcpp
# opens pcmanfm, sometimes you need floating windows
super + {shift,ctrl} + F3
{_,gksu} pcmanfm
# opens alsamixer
super + ctrl + m
$TERMINAL -e 'alsamixer'
# hide / unhide polybar
super + shift + p
polybar-msg cmd toggle
# opens the video linked in the clipboard in mpv
super + shift + v
notify-send 'mpv' 'opening video...'; \
xclip -o -selection clipboard | \
xargs mpv --volume=50 --ytdl-format='bestvideo[height<=1080]+bestaudio/best' --ytdl-raw-options=buffer-size=16K
# do system related stuff!
super + 0
i3_exit.sh
#
# useful media and such stuff
#
# prints either the current screen or a section of the screen
super + {_,shift,ctrl} + @XF86LaunchA
i3_scrot.sh -{w,s,d}
super + {_,shift,ctrl} + @Print
i3_scrot.sh -{w,s,d}
# for my notebook, toggles the touchpad
XF86TouchpadToggle
touch_toggle.sh
# media keys
XF86Audio{Play,Stop,Next,Prev}
playerctl {play-pause,stop,next,previous}
# volume keys
XF86Audio{Raise,Lower}Volume
pactl set-sink-volume 1 {+,-}5%
#
# stuff that really is only here because some stuff is kinda broken sometimes
#
super + {_,ctrl,shift} + {t,d,x,e}
CMD='{stop,start,restart} {picom,dunst,sxhkd,emacs}.service'; systemctl --user $CMD; notify-send $CMD
# # to start and stop compton
# super + {_,ctrl,shift} + t
# CMD='{stop,start,restart} picom.service'; systemctl --user $CMD; notify-send $CMD
# # restart the notification system
# super + shift + d
# CMD='restart dunst.service'; systemctl --user $CMD; notify-send $CMD
# # reload sxhkd, useful if you added any new keybindings
# super + shift + x
# CMD='reload sxhkd.service'; systemctl --user $CMD; notify-send $CMD
# # restarts emacs
# super + shift + e
# CMD='restart emacs.service'; systemctl --user $CMD; notify-send $CMD
# i used to do things this way, which is way fancier btw:
# tee >(xargs notify-send) >(xargs -n 2 systemctl --user) <<<'restart emacs.service'