-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsxhkdrc
143 lines (111 loc) · 3.05 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
#
# wm independent hotkeys
#
# terminal emulator
super + Return
alacritty
# program launcher
super + space
rofi -show drun
# emoji picker
super + e
rofi -show emoji -modi emoji -theme ~/.cache/wal/rofi-theme.rasi
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
# dismiss notifications
ctrl + space
dunstctl close
# datetime/battery notification
super + d
~/scripts/notify-sysinfo.sh
# screenshot
super + shift + p
scrot '/home/intarga/Pictures/%Y-%m-%d_$wx$h.png'
# brightness control
XF86MonBrightness{Down,Up}
brightnessctl s \
{"$(brightnessctl g | awk '\{ print int($1 /1.4) \}')",\
"$(brightnessctl g | awk '\{ print int(($1 + .72) * 1.4) \}')"};\
notify-send -h string:x-dunst-stack-tag:backlight "Backlight" \
`brightnessctl | grep -Eo "[0-9]+%"`
# volume control
XF86Audio{LowerVolume,RaiseVolume,Mute}
amixer -D pulse sset Master {5%-, 5%+, 0%} ; \
notify-send -h string:x-dunst-stack-tag:volume "Volume" \
`amixer -D pulse get Master | grep -Eo -m 1 "[0-9]+%"`
# media control
XF86Audio{Play,Prev,Next}
playerctl {play-pause,previous,next}
# change x keyboard language
shift + space
~/scripts/change-lang.sh
# compositor stop/start
super + c
killall compton
super + shift + c
compton &
#
# bspwm hotkeys
#
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }q
bspc node -{c,k}
# toggle gaps
super + g
case "$(bspc config window_gap)" in \
0) bspc config window_gap 15 ;; \
*) bspc config window_gap 0 ;; esac
# toggle bar
super + b
case "$(bspc config left_padding)" in \
0) bspc config left_padding 27 ; eww open bar ;; \
*) bspc config left_padding 0 ; eww close bar ;; esac
# alternate between the tiled and monocle layout
super + f
bspc desktop -l next
# swap the current node and the biggest node
super + m
bspc node -s biggest.local
#
# state/flags
#
# set the window state
super + {t,shift + t,s}
bspc node -t {tiled,pseudo_tiled,floating}
# set the node flags
super + ctrl + {s,h}
bspc node -g {sticky,hidden}
# unhide windows in the current desktop
super + ctrl + shift + h
while bspc node any.hidden.window -g hidden=off; do :; done
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the next/previous node in the current desktop
super + {_,shift + }Tab
bspc node -f {next,prev}.local.leaf
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}