#
# {{@@ header() @@}}
#

##
# bspwm hotkeys
##

# Kill open logout menu
super + alt + Escape
  xfce4-session-logout

# Switch to desktop
ctrl + alt + {Left,Right}
  bspc desktop -f {prev,next}

# Move current window
# TODO Modifier dose not apply to all commands!!
#ctrl + alt + shift + {Left,Right}
#  bspc node -d {prev,next} \
#  ;bspc desktop -f {prev,next}

# Move current window to left
ctrl + alt + shift + Left
  bspc node -d prev \
  ;bspc desktop -f prev

# Move current window to right
ctrl + alt + shift + Right
  bspc node -d next \
  ;bspc desktop -f next

# Select (Switch)/Move Window
super + {_,shift + }{Left,Down,Up,Right}
  bspc node -{f,s} {west,south,north,east}

# Preselect where to split
super + alt + {space,Left,Down,Up,Right}
  bspc node -p {cancel,west,south,north,east}

# Set state of the current window (floating|fullscreen)
super + {s,f,t}
  bspc node -t {floating,fullscreen,tiled}

# Close current window
super + w
  bspc node -c

# === function keys ===

# rotate windows
ctrl + F1
	bspc node @/ -R 90

# circulate windows
ctrl + 2
	bspc node @/ -C forward

# flip windows horizontal
ctrl + 3
	bspc node @/ -F horizontal

# flip windows vertical
ctrl + 4
	bspc node @/ -F vertical

# alternate between the tiled and monocle layout
ctrl + F5
	bspc desktop -l next

# balance windows
ctrl + F6
	bspc node @/ -B

# Change window gap
ctrl + {F7,F8}
	bspc config -d focused window_gap $((`bspc config -d focused window_gap` {+,-} 2 ))

# set the window state
ctrl + {F9,F10,F11,F12}
	bspc node -t {floating,tiled,pseudo_tiled,fullscreen}

# Select desktop layout (monocle|tiled)
# TODO, why sould I use this?
#super + l
#  bspc desktop -l next


##
# wm independent hotkeys
##

# Start rofi program launcher
super + space
  rofi -show drun

# Start xfce4 terminal
super + Return
  xfce4-terminal

# rofi window changer
alt + Tab
  rofi -show window

# Filemanager (thunar)
super + e
  nemo

# Volume control is now handled by xfce4-volumed-pulse
# Lower,Raise Volume Master
#{_,shift + }XF86Audio{Lower,Raise}Volume
#  amixer set Master {2%-,10%-,2%+,10%+}

# Mute Master
#XF86AudioMute
#  amixer set Master toggle

# Modify LCD Brightness
# XF86MonBrightness{Down,Up} are the Display Birghtness Keys
# Not needed anymore. Is handled by xfce
#{_,shift + }XF86MonBrightness{Down,Up}
#  xbacklight {-1,-10,+1,+10}

# Screenlock via slim
#ctrl + alt + l
super + l
  xflock4

# Lock & Suspend System (keep RAM in physical RAM)
ctrl + alt + BackSpace
  slimlock & systemctl suspend

# Lock & Hybernate System (save RAM to SSD)
ctrl + alt + Insert
  slimlock & systemctl hibernate


## Stratum 0
## Holodeck
# Holodeck nice white
#ctrl + shift + 1
#  curl http://holodeck.stratum0.net/holodeck/all/nicewhite

# Holodeck cold white
#ctrl + shift + 2
#  curl http://holodeck.stratum0.net/holodeck/all/day

# Holodeck red
#ctrl + shift + 3
#  curl http://holodeck.stratum0.net/holodeck/all/0.2,0,0,0

# Holodeck nearly off (nightmode)
#ctrl + shift + 4
#  curl http://holodeck.stratum0.net/holodeck/all/night

# Holodeck off
#ctrl + shift + 5
#  curl http://holodeck.stratum0.net/holodeck/all/off



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