Skip to content

Instantly share code, notes, and snippets.

@warmwaffles
Last active June 11, 2020 16:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warmwaffles/91cd46dc8d791a9d06d4f1ea617bd8e3 to your computer and use it in GitHub Desktop.
Save warmwaffles/91cd46dc8d791a9d06d4f1ea617bd8e3 to your computer and use it in GitHub Desktop.
# WM {{{
# Focus node
# If no window exist, target monitor/desktop instead
super + k
bspc node -f north || bspc monitor -f north
super + j
bspc node -f south || bspc monitor -f south
super + h
bspc node -f west || bspc monitor -f west || bspc desktop -f prev
super + l
bspc node -f east || bspc monitor -f east || bspc desktop -f next
# Swap node
# If no node exist, send node to monitor instead
super + shift + h
if ! bspc node -s west.local; then bspc node -m west && bspc node $(bspc query -N -n last) -f; fi
super + shift + l
if ! bspc node -s east.local; then bspc node -m east && bspc node $(bspc query -N -n last) -f; fi
super + shift + k
if ! bspc node -s north.local; then bspc node -m north && bspc node $(bspc query -N -n last) -f; fi
super + shift + j
if ! bspc node -s south.local; then bspc node -m south && bspc node $(bspc query -N -n last) -f; fi
# Resize current window
super + r : {_,shift + ,super + ,shift + super + }h
val={200,100,50,10}; bspc node @west -r -${val} || bspc node @east -r -${val}
super + r : {_,shift + ,super + ,shift + super + }l
val={200,100,50,10}; bspc node @west -r +${val} || bspc node @east -r +${val}
super + r : {_,shift + ,super + ,shift + super + }k
val={200,100,50,10}; bspc node @north -r -${val} || bspc node @south -r -${val}
super + r : {_,shift + ,super + ,shift + super + }j
val={200,100,50,10}; bspc node @north -r +${val} || bspc node @south -r +${val}
# Set splitting area
super + ctrl + {h,j,k,l}
bspc node -p ~{west,south,north,east}
# Adjust splitting ratio
super + {minus,equal}
bspc node -r $(bspwm_noderatio {+10,-10})
# Clear splitting indication
super + ctrl + space
bspc node -p cancel
# Clear splitting indicators for all nodes on the focused desktop
super + ctrl + shift + space
bspc query -N | xargs -I id -n 1 bspc node id -p cancel
# Cycle non-empty between desktops and monitors
super + {_,ctrl + }bracket{left,right}
bspc {desktop,monitor} -f {prev.occupied,next.occupied}
# Cycle between all desktops and monitors
super + shift + {_,ctrl + }bracket{left,right}
bspc {desktop,monitor} -f {prev,next}
# Focus desktop / transfer node to desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} focused:^{1-9,10}
# Toggle fullscreen/floating state
super + shift + f
bspc node -t \~fullscreen
super + ctrl + f
bspc node -t \~floating
super + shift + t
bspc node -t \~tiled
# Close/kill current window
super + {_,shift + }q
bspc node -{c,k}
# swap the current node and the biggest node
super + s
bspc node -s biggest
# Move focused desktop/node to previously focused monitor
super + {_,shift + }y
bspc {desktop,node focused} -m next && bspc {desktop,node} -f last
# Rotate the tree that the current window belongs to
super + {_,shift + }c
bspc node @parent -R {90,270}
# Cycle desktop layout
super + f
bspc desktop -l next
# Cycle between windows
super + {_,shift + }n
bspc node -f {prev,next}
# Balance the size of all nodes in the current desktop
super + b
bspc desktop -B
# Focus previously current window
super + Tab
bspc node -f last
# Toggle locked state of current window
super + ctrl + comma
bspc node -g locked && notify-send "Toggled locked state"
# Toggle sticky state of current window
super + ctrl + period
bspc node -g sticky && notify-send "Toggled sticky state"
# Toggle private state of current window
super + ctrl + slash
bspc node -g private && notify-send "Toggled private state"
# Focus clicked node
~button1
bspc pointer -g focus
# Reload configuration
super + Escape
pkill -USR1 -x sxhkd && notify-send "Reloaded sxhkd"
# Quit
super + shift + Escape
bspc quit
# }}}
# Application launcher {{{
# program launcher
super + space
dmenu_run -b
super + F12
subl3
super + F11
enpass
XF86HomePage
google-chrome-stable
XF86Calculator
gnome-calculator
XF86Explorer
thunar
# }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment