~q3cpma/dotfiles

dotfiles/.config/sxhkd/sxhkdrc -rw-r--r-- 2.6 KiB
40862a33q3cpma sync a month ago
                                                                                
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
# terminal emulator
super + Return
	st

# program launcher
super + d
	dmenu_run

# quit bspwm normally
super + shift + q
	bspc quit

# close and kill
super + {q,k}
	bspc node -{c,k}

# if the current node is automatic, send it to the last manual, otherwise pull the last leaf
super + y
	bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused

# swap the current node and the biggest node
super + g
	bspc node -s biggest

#
# state/flags
#

# Toggle floating/tiling
super + space
	bspc query --nodes -n focused.tiled && state=floating || state=tiled; \
		bspc node --state \~$state

super + f
	bspc node --state \~fullscreen

#
# focus/swap
#

super + {_, shift} + r
	bspc node @/ --rotate {-90, 90}

# focus the node in the given direction
super + {_,shift + }{Left, Down, Up, Right}
	bspc node -{f,s} {west,south,north,east}

# focus the next/previous node in the current desktop
super + {less, greater}
	bspc node -f {next,prev}.local

# focus the older or newer node in the focus history
super + {o,i}
	bspc wm -h off; \
	bspc node {older,newer} -f; \
	bspc wm -h on

# focus or send to the given desktop
super + {_,shift + }{ampersand, eacute, quotedbl, apostrophe, parenleft, minus, egrave, underscore, ccedilla, agrave}
	bspc {desktop -f,node -d} '^{1-9,10}'

#
# preselect
#

# preselect the direction
super + ctrl + {Left, Down, Up, Right}
	bspc node -p {west,south,north,east}

# preselect the ratio
super + ctrl + {ampersand, eacute, quotedbl, apostrophe, parenleft, minus, egrave, underscore, ccedilla}
	bspc node -o 0.{1-9}

# cancel the preselection for the focused node
super + ctrl + g
	bspc node -p cancel

# cancel the preselection for the focused desktop
super + ctrl + shift + space
	bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel

#
# move/resize
#

# expand a window by moving one of its side outward
super + alt + {Left, Down, Up, Right}
	bspc node -z {left -40 0,bottom 0 40,top 0 -40,right 40 0}

# contract a window by moving one of its side inward
super + alt + shift + {Left, Down, Up, Right}
	bspc node -z {right -40 0,top 0 40,bottom 0 -40,left 40 0}


# Custom bindings

Pause
	mus_client TOGGLE_PLAY_PAUSE

super + {Prior, Next}
	mus_client {TRACK_PREV, TRACK_NEXT}

super + p
	passmenu --type

super + w
	bwrap_auto.bash qutebrowser

super + m
	st -e zsh -c 'sudo hotplug_mount.sh; ranger; sudo hotplug_umount.sh'

# super + l
#	xscreensaver-command -lock

{_, shift} + Print
	screenshot.sh {fullscreen, }

# Send USR1 to the focused window (doesn't work everytime; can close the window)
super + h
	kill -USR1 $(xdo pid)

# Toggle redshift
super + shift + c
	pkill -x -USR1 redshift