# full example [here](https://github.com/baskerville/bspwm/blob/master/examples/sxhkdrc)

super + shift + r
    notify-send "restarting BSPWM"; \
    bspc wm --restart
super + {_,shift + }w
    bspc node --{close,kill}
super + m
    bspc desktop --layout next

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

super + {_,shift + }{h, j, k, l}
    bspc node --{focus,swap} {west, south, north, east}
super + {_,shift + }c
    bspc node --focus {next,prev}.local.!hidden.window
super + bracket{left,right}
    bspc desktop --focus {prev,next}.local; \
    if [ "$?" = 0 ]; then \
        dunstify "bspwm/sxhkd" "Switching to $(bspc query -D -d --names)" --timeout=1000 --replace=128; \
    fi
super + shift + bracket{left,right}
    bspc monitor --focus {prev,next}; \
    if [ "$?" = 0 ]; then \
        dunstify "bspwm/sxhkd" "Switching to $(bspc query -M -m --names)" --timeout=1000 --replace=128; \
    fi
super + {o,i}
    bspc wm --record-history off; \
    bspc node {older,newer} --focus; \
    bspc wm --record-history on; \
    if [ "$?" = 0 ]; then \
        dunstify "bspwm/sxhkd" "Switching to $(bspc query -D -d --names)" --timeout=1000 --replace=128; \
    fi

super + {_,shift + }{1-9,0}
    { \
        action="desktop --focus"; message="Switching to"; \
    ,   action="node --to-desktop"; message="Sending to"; \
    } \
\
    node="{1-9,10}"; \
    bspc $action "^$node"; \
\
    if [ "$?" = 0 ]; then \
        dunstify "bspwm/sxhkd" "$message $node" --timeout=1000 --replace=128; \
    fi

super + Tab
    bspc desktop -f last; \
    if [ "$?" = 0 ]; then \
        dunstify "bspwm/sxhkd" "Switching to $(bspc query -D -d --names)" --timeout=1000 --replace=128; \
    fi

super + ctrl + {h,j,k,l}
    bspc node --presel-dir {west,south,north,east}
super + ctrl + {1-9}
    bspc node --presel-ratio 0.{1-9}
super + ctrl + Escape
    bspc node --presel-dir cancel
super + ctrl + shift + space
    bspc query --nodes --desktop | xargs -I id -n 1 bspc node id --presel-dir cancel

super + {_,ctrl + }alt + {h,j,k,l}
    { \
        n=135; \
    ,   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
