aboutsummaryrefslogtreecommitdiff
path: root/stow/sxhkd/.config/sxhkd/sxhkdrcbspc
blob: 4da5192c1ec256911b5d65f78d40a0ac321c06dc (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
#           _     _       _          _
#  _____  _| |__ | | ____| |_ __ ___| |__  ___ _ ____      ___ __ ___
# / __\ \/ / '_ \| |/ / _` | '__/ __| '_ \/ __| '_ \ \ /\ / / '_ ` _ \
# \__ \>  <| | | |   < (_| | | | (__| |_) \__ \ |_) \ V  V /| | | | | |
# |___/_/\_\_| |_|_|\_\__,_|_|  \___|_.__/|___/ .__/ \_/\_/ |_| |_| |_|
#                                             |_|
#
# Config file for the Simple X HotKey Daemon with bspwm

# Select next or previous monitor
super + {period,comma}
	bspc monitor {next,prev} -f

# Move node to next or previous monitor and keep it focused
super + shift + {period,comma}
	bspc node -m {next,prev} --follow

# Select next or previous desktop on focused monitor
super + {n,p}
	bspc desktop {next,prev}.local -f;\
	dunstify -r "$(dunstifyIDs.sh bspwmDesktop)" -t 500 \
		"$(bspc query -D -d focused.local --names)"

# Send node to next or previous desktop on focused monitor
super + shift + {n,p}
	bspc node -d {next,prev}.local

# Select a specific desktop on focused monitor
super + {0-9}
	bspc desktop 'focused:^{0-9}' -f

# Send node to specific desktop on focused monitor
super + shift + {0-9}
	bspc node -d 'focused:^{0-9}'

# Directionally select node with same floating state
super + {h,j,k,l}
	bspcDirectionFocus.sh {west,south,north,east}

# Swap node with adjacent node or move it if floating
super + shift + {h,j,k,l}
	bspcSwapOrMove.sh {h,j,k,l}

# Resize node
super + alt + {h,j,k,l}
	bspc node --resize {right -5 0,bottom 0 5,bottom 0 -5,right 5 0}

# Resize gaps
super + g
	bspc config window_gap $(($(bspc config window_gap) - 2))
super + shift + g
	bspc config window_gap $(($(bspc config window_gap) + 2))

# Select split direction
super + {v,b}
	bspc node --presel-dir ~{south,east}

# Swap focus between tiled and floating nodes
super + space
	if bspc query -T -n | grep -q '"state":"floating"'; then \
		bspc node -f last.local.leaf.!floating; \
	else \
		bspc node -f last.local.leaf.floating; \
	fi

# Switch focused node floating state
super + shift + space
	bspc node -t ~floating

# Jump to next or previous global window
super + ctrl + {h,l}
	bspc node -f {next,prev}.window

# Change layout (m for monocle)
super + m
	bspc desktop -l next

# Close window on focused node
super + shift + q
	bspc node -c

# Notify number of windows
super + c
	dunstify -r "$(dunstifyIDs.sh "bspwmRunningStuff")" -t 1000 "Running stuff" "bspwm nodes:\n$(bspc query -N any.leaf.window | wc -l)\ntmux sessions:\n$(tmux list-sessions | cut -d':' -f1)"