# # General keybindings. # # Basic. super + Return $TERMINAL super + d i3-dmenu-desktop super + Escape pkill -USR1 -x sxhkd # Run programs. super + shift + w $BROWSER super + shift + f $TERMINAL -e $FILE super + Delete $TERMINAL -e htop # Screenshots. {_,super, super + shift} + Print $SSMGR {gui,full -c,full -p $SSPATH} # # bspwm keybindings. # # Quit/restart bspwm. super + shift + {e,r} bspc {quit,wm -r} # 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 window. super + g bspc node -s biggest.window # # State/flags. # # 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/swap. # # Socus 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 window in the current desktop. super + {_,shift + }c bspc node -f {next,prev}.local.!hidden.window # Focus the next/previous desktop in the current monitor. super + brace{left,right} bspc desktop -f {prev,next}.local # Focus the last node/desktop. super + {Tab,dead_acute} bspc {node,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 # Focus or send to the given desktop. super + {_,shift + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}' # # Preselect. # # 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 # # Move/resize. # # Expand a window by moving one of its side outward. super + alt + {h,j,k,l} n=20; \ bspc node -z {left -$n 0,bottom 0 $n,top 0 -$n,right $n 0} # Contract a window by moving one of its side inward. super + alt + shift + {h,j,k,l} n=20; \ bspc node -z {right -$n 0,top 0 $n,bottom 0 -$n,left $n 0} # Move a floating window. super + {Left,Down,Up,Right} bspc node -v {-20 0,0 20,0 -20,20 0} # Smart resize, will grow or shrink depending on location. # Will always grow for floating nodes. super + alt + ctrl + {Left,Down,Up,Right} n=10; \ { d1=left; d2=right; dx=-$n; dy=0; \ , d1=bottom; d2=top; dx=0; dy=$n; \ , d1=top; d2=bottom; dx=0; dy=-$n; \ , d1=right; d2=left; dx=$n; dy=0; \ } \ bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy