bspwm cheat sheet

Common keys

Super + Escapesxhkd: reload configuration
Super + BreakLogoff menu
Super + Qclose focused window
Super + Shift + Qkill focused window

Window management

Super Mtoggle tiled/monocle mode
Super Ybring marked window to current receptacle
Super Gswap focused window with the biggest one on the current desktop
Super Ttiled mode for focused window
Super Shift Tpseudo_tiled mode for focused window
Super Sfloating mode for focused window
Super Ffullscreen mode for focused window

Window flags

Super Ctrl MFlag: mark
Super Ctrl XFlag: locked
Super Ctrl YFlag: sticky
Super Ctrl ZFlag: private


Super { H, J, K, L }Move focus to {west, south, north, east}
Super Shift { H, J, K, L }Move focused window to {west, south, north, east}
Super { P, B, Comma, Period }Path jump {parent, brother, first, second}
Super Nselect next window on active desktop
Super Shift Nselect previous window on active desktop
Super >select next desktop on active monitor
Super <select previous desktop on active monitor
Super Ofocus history: walk backwards
Super Ifocus history: walk forwards
Alt Tabselect previous active window
Alt Shift Tabselect previous active desktop

Preselection / Receptacles

Super Ctrl { H, J, K, L }preselect: {west, south, north, east}
Super Ctrl Spaceremove preselection for active window
Super Ctrl Shift Spaceremove preselection for active desktop

Window size/position

Ctrl Alt { H, J, K, L }resize active window outwards {west, south, north, east}
Ctrl Alt Shift { H, J, K, L }resize active window inwards {west, south, north, east}
Ctrl Alt { , , , }move current window (floating mode only)

Desktop management

Super { ^, 0-9, ß, ´ }select desktop {0-12}
Super Shift { ^, 0-9, ß, ´ }move active window to desktop {0-12}
Super Ctrl { ^, 0-9, ß, ´ }swap active destop and desktop {0-12}
Super Ctrl Shift { ^, 0-9, ß, ´ }move active destop to the monitor of desktop {0-12}
Super Ctrl Shift { +, - }move active destop to the {next,prev} monitor
Super Ctrl Shift { H, J, K, L }move active destop to the {western,southern,northern,eastern} monitor


Super TabRofi: open bookmarks
Super BreakRofi: shutdown/sleep
Super Printscreenksnapshot
Super Enterurxvt
Hyper Rranger
Hyper Kkrusader
Hyper FRofi: FontAwesome-selection
Hyper PRofi: Asterisk (dial a phone number)
Hyper DRofi: combi
Hyper Shift DRofi: drun
Hyper Ctrl DRofi: ssh
Hyper Ctrl CRofi: edit config files
Hyper SRofi: Screen-Layout
Hyper OPseudo-terminal



# make sxhkd reload its configuration files:
super + Escape
	pkill -USR1 -x sxhkd

hyper + g


# quit/restart bspwm
super + shift + {Escape}
	bspc {quit}

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

# alternate between the tiled and monocle layout
super + m
	bspc desktop -l next

# send the newest marked node to the newest preselected node
super + y
	bspc node newest.marked.local -n newest.!automatic.local

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


# set the window state
super + {t,shift + t,s,f}
	bspc node -t {tiled,pseudo_tiled,floating,fullscreen}

# set the node flags
super + ctrl + {m,x,y,z}
	bspc node -g {marked,locked,sticky,private}


# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
	bspc node -{f,s} {west,south,north,east}

# focus the node for the given path jump
super + {p,b,comma,period}
	bspc node -f @{parent,brother,first,second}

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

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

# focus the last node/desktop
alt + Tab
	bspc node -f last

alt + shift + Tab
	bspc desktop -f last

# 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


# preselect the direction
super + ctrl + {h,j,k,l}
	bspc node -p {west,south,north,east}

# preselect the ratio
#super + ctrl + {1-9}
#	bspc node -o 0.{1-9}

# cancel the preselection for the focused node
super + ctrl + space
	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


# expand a window by moving one of its side outward
ctrl + 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
ctrl + 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
ctrl + alt + {Left,Down,Up,Right}
	bspc node -v {-20 0,0 20,0 -20,20 0}

 xbacklight -{inc,dec} 5 &

 ~/bin/toggleAsusTouchpad &

# on the asus this needs kernel module asus-wireless to be loaded

 amixer -q -D pulse sset Master toggle &

 amixer -q -D pulse sset Master 5%{-,+} unmute &

 ~/bin/ {PlayPause,Previous,Next,Stop} &

	~/bin/i3/ && systemctl suspend -i


# heres comes a dirty hack: KeepassXC won't handle Scroll_Lock...
# so KeepassXC will autotype on ctrl+shift+alt+greater. We use xdotool
# to send those keys on Scroll_Lock:
	xdotool key --window `xdotool search "oliver-main - KeePassX" | head -n1` --delay 25 --clearmodifiers ctrl+alt+shift+greater

super + Return

super + Pause

super + Tab

super + Print

hyper + r
 /usr/bin/urxvt -e ranger

hyper + k

hyper + f

hyper + control + c

hyper + d
	~/bin/i3/ combi

hyper + shift + d
	~/bin/i3/ drun

hyper + ctrl + d
	~/bin/i3/ ssh

hyper + p

hyper + s

hyper + m; {m,u}
	~/bin/ {start,stop}

hyper + o
  urxvt -shading 100 -title 'pseudoframe' -name 'pseudoframe' -e sh -c 'tput civis; sleep 365d'

# Dynamic desktop behaviour:  this invokes a script of mine that
# implements dynamic desktops (see dotfiles).  If the given desktop
# number is missing, it is created on the spot.  Empty desktops are then
# removed automatically.
# mod3 +  = focus the given desktop
# mod3 + shift +  = send focused window to given desktop
# mod3 + ctrl + shift +  = as above, but send to next monitor
# mod3 + ctrl +  = switches the active (visible) desktop of the
# unfocused monitor, without focusing it (focus stays on the current
# desktop/monitor).  It also inserts a receptacle, meaning that the next
# created window will go there without calling focus to itself (see my
# bspwm_external_rules).
# Commands for receptacles are defined in the "advanced operations"
# section.
# NOTE the leading `;` runs this command asynchronously.
#super + {_,shift + ,ctrl + shift +,ctrl +}{asciicircum,1-9,0,ssharp,acute}
#	;bspwm_dynamic_desktops {--df,--ns,--nm,--da} {0,1-9,10,11,12}
#super + {_,shift + }{asciicircum,1-9,0,ssharp,acute}
#	;bspwm_dynamic_desktops {--df,--ns} {0,1-9,10,11,12}

#focus or send to the given desktop
super + {_,shift + }{grave,asciicircum,1-9,0,ssharp,minus,equal,acute}
	bspc {desktop -f,node -d} {0,0,1-9,10,11,11,12,12}

#swap desktops
super + ctrl + {grave,asciicircum,1-9,0,ssharp,minus,equal,acute}
	bspc desktop -s {0,0,1-9,10,11,11,12,12} --follow

#send focused desktop to the monitor of target desktop
super + ctrl + shift + {grave,asciicircum,1-9,0,ssharp,minus,equal,acute}
	bspc desktop -m `bspc query -M -d {0,0,1-9,10,11,11,12,12} --names` --follow

#send focused desktop to next/previous/{dir} monitor
super + ctrl + shift + {n,p,h,j,k,l}
	bspc desktop -m {next,prev,west,south,north,east} --follow

super + F1
	surf -BS