# sxhkdrc — pentest-env BSPWM keybindings (Simple X Hotkey Daemon). # Deployed to ~/.config/sxhkd/sxhkdrc. Reload after edits: super + Escape # Convention: super = Mod4 (the "windows" key). Ergonomic, vim-style hjkl. # ───────────────────────────── applications ───────────────────────────── # terminal super + Return alacritty # program launcher (rofi drun) super + @space rofi -show drun # window switcher (rofi) super + Tab rofi -show window # browser super + shift + Return firefox # file manager super + e thunar # run dialog (rofi run) super + r rofi -show run # clipboard history (clipmenu via rofi) — needs clipmenud running (bspwmrc autostart) # NOTE: super+c is taken by "focus next window" below — use super+v (paste-mnemonic). super + v CM_LAUNCHER=rofi clipmenu # power menu (logout / reboot / poweroff / lock) super + shift + e ~/.config/rofi/powermenu.sh # quick screen lock (classic ctrl+alt+l) — routed through xss-lock's locker ctrl + alt + l loginctl lock-session 2>/dev/null || xset s activate # ─────────────────────────── bspwm / sxhkd ────────────────────────────── # reload sxhkd super + Escape pkill -USR1 -x sxhkd; notify-send "sxhkd" "config reloaded" # restart bspwm super + shift + r bspc wm -r; notify-send "bspwm" "reloaded" # quit / logout bspwm super + shift + q bspc quit # ──────────────────────────── window control ──────────────────────────── # close / kill focused super + {_,shift + }w bspc node -{c,k} # toggle tiled / pseudo_tiled / floating / fullscreen super + {t,shift + t,s,f} bspc node -t {tiled,pseudo_tiled,floating,fullscreen} # toggle sticky (visible on all desktops) super + shift + s bspc node -g sticky # toggle hidden (scratchpad-style) super + shift + h bspc node -g hidden # ─────────────────────────── focus / movement ─────────────────────────── # focus node in given direction (vim hjkl) super + {h,j,k,l} bspc node -f {west,south,north,east} # swap focused node in given direction super + shift + {h,j,k,l} bspc node -s {west,south,north,east} --follow # focus next/previous window on the current desktop super + {_,shift + }c bspc node -f {next,prev}.local.!hidden.window # focus the next/previous desktop super + bracket{left,right} bspc desktop -f {prev,next}.local # focus last node / last desktop super + {grave,Tab} bspc {node,desktop} -f last # focus or send to a given desktop (1-9, 0 == 10) super + {_,shift + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}' # ─────────────────────────────── preselect ────────────────────────────── # preselect the splitting 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 / desktop super + ctrl + {_,shift + }space bspc {node,desktop} -p cancel # ─────────────────────────────── resize ───────────────────────────────── # expand a window by moving one of its sides outward super + 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 sides inward super + alt + shift + {h,j,k,l} bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} # rotate / balance / flip the tree super + {comma,period} bspc node @parent -R {-90,90} super + b bspc node @/ -B super + shift + b bspc node @/ -E # ──────────────────────── media / system controls ─────────────────────── # volume (PulseAudio / PipeWire via pactl) + notify XF86AudioRaiseVolume pactl set-sink-volume @DEFAULT_SINK@ +5% && pkill -RTMIN+10 polybar XF86AudioLowerVolume pactl set-sink-volume @DEFAULT_SINK@ -5% && pkill -RTMIN+10 polybar XF86AudioMute pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -RTMIN+10 polybar XF86AudioMicMute pactl set-source-mute @DEFAULT_SOURCE@ toggle # media player (playerctl) XF86Audio{Play,Pause} playerctl play-pause XF86Audio{Next,Prev} playerctl {next,previous} # brightness (brightnessctl; harmless no-op in a VM with no backlight) XF86MonBrightness{Up,Down} brightnessctl set {+5%,5%-} # ────────────────────────────── screenshots ───────────────────────────── # full screen -> clipboard + file Print maim "$HOME/Pictures/$(date +%F_%H-%M-%S).png" && notify-send "Screenshot" "saved to ~/Pictures" # region select -> clipboard super + Print maim -s | xclip -selection clipboard -t image/png && notify-send "Screenshot" "region copied to clipboard" # active window -> clipboard shift + Print maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png