## System

# Quit bspwm
super + ctrl + Escape
 pkill -x panel; bspc quit

# Reload sxhkd
super + Escape
 pkill -USR1 -x sxhkd

# Lock
super + z
 slimlock

## Monitors

# Move node to the other monitor
super + {_,shift} + percent
 bspc {monitor -f next,node -m next --follow}

## Desktop

# Go to prev, next, nth or last desktop and back, optionally --carrying a node
super + {_,shift} + {v,l,n,quotedbl,guillemotleft,guillemotright,parenleft,parenright,Delete,at,plus,minus,slash}
 carry={_,--carry}; \
 wm goto {prev,next,last, , ,1,2,3,4,5,6,7} "$carry"

# Send node to a new empty desktop at the far right (and follow)
super + {_,shift} + j
 wm discard {_,--follow}

# Rotate desktop
super + {q,h}
 bspc node @focused:/ -R {270,90}

# Balance desktop
super + k
 bspc node @focused:/ -B

# Show conky
super + c
 wm peek left

# Show calendar
super + m
 wm peek right

## Nodes

# Focus/swap to DIR
super + {_,shift + }{t,s,d,r}
 bspc node -{f,s} {west,south,north,east}

# Focus to CYCLE_DIR
super + w
 bspc node -f next.local

# Preselect node to DIR
super + ctrl + {t,s,d,r}
 bspc node -p \~{west,south,north,east}

# Resize node to DIR
super + alt + {t,s,d,r}
 bspc node @{west -r -100,south -r +100,north -r -100,east -r +100}
super + alt + shift + {t,s,d,r}
 bspc node @{east -r -100,north -r +100,south -r -100,west -r +100}

# Toggle floating/pseudo_tiles/fullscreen
super + {y,x,period}
 bspc node -t \~{floating,tiled,fullscreen}

# Move to presel
super + b
 bspc node -n last.!automatic

# Close node
super + {g,agrave}
 bspc node -c

## Externals

# Rnager
super + space
 wm popup Ranger ranger

# Volume
super + e
 wm popup Volume pulsemixer

# Weather
super + p
 xdotool search --onlyvisible --classname Meteo windowkill ||\
 kitty --override background_opacity=0 -o background='#000000' -o font_size=9 --hold --name Meteo meteo_display && meteo

# Pin pop-up window
super + shift + space
 bspc node -g sticky=off -t tiled &&\
 xdotool getactivewindow set_window --classname urxvt

# Launcher
super + alt + space
 rofi -font "monofur for Powerline 18" -show

# Open terminal
super + ctrl + space
 kitty

# Emacs client
super + Return
 emacsclient -nc

# Arandr
XF86Display
 arandr

## Brightness control

XF86MonBrightnessUp
 xbacklight +5

XF86MonBrightnessDown
 xbacklight -5

## Audio

XF86AudioPlay
 mpc toggle;\
 dunstify -r 1234 "`echo -e "\uf04b\uf04c"`"

## Screenshot

Print
 scrot

alt + Print
 scrot -s
