# make sxhkd reload its configuration files: super + Escape dunstctl set-paused true ; i3lock -tfi ~/Dropbox/Images/wallpapers/stmichael.png ; dunstctl set-paused false # make sxhkd reload its configuration files: super + ctrl + Escape pkill -usr1 -x sxhkd; dunstify 'sxhkd' 'Reloaded config' # # Gaps # super + {_,shift + }equal bspc config -d focused window_gap $(($(bspc config -d focused window_gap) + {2,10})) super + {_,shift + }minus bspc config -d focused window_gap $(($(bspc config -d focused window_gap) - {2,10})) # Terminal super + Return alacritty -e tmux super + shift + Return alacritty super + ctrl + Return alacritty --class Floating super + e st -z 14 # alacritty --class Floating --option 'font.size=24.0' --option 'window.dimensions={columns=100,lines=20}' --command vim ~/scratchpad super + shift + e st -z 14 -e tmux super + control + e st -c Floating -z 16 # alacritty --class Floating --option 'font.size=24.0' --option 'window.dimensions={columns=100,lines=20}' --command vim --clean ~/scratchpad # Settings super + shift + s pavucontrol # program launcher super + @space rofi -show drun -window-thumbnail -window-format "\{w\} \{t\}" super + shift + @space rofi -show run -window-thumbnail -window-format "\{w\} \{t\}" super + ctrl + @space rofi -show window -window-thumbnail -window-format "\{w\} \{t\}" -window-command "bspc node \{window\} -d newest -f" super + i rofi -show filebrowser -theme dark-grid super + ctrl + i rofi -filebrowser-directory $HOME/Pictures/Screenshots -show filebrowser -show filebrowser -theme dark-grid super + p rofi-pass --last-used -lines 12 # Notifications # Redisplay last message(s). ctrl + grave dunstctl history-pop # Close notification. ctrl + shift + grave dunstctl close # Close all notifications. ctrl + shift + alt + grave dunstctl close-all # Context menu. ctrl + shift + period dunstctl context # start a web browser super + o /usr/bin/librewolf -P personal super + ctrl + o /usr/bin/librewolf -P work super + alt + o bspc rule -a '*:*' -o state=floating ; /usr/bin/librewolf -P personal super + shift + p bspc rule -a '*:*' -o state=floating ; /usr/bin/librewolf --private-window # super + alt + b # ~/.local/bin/rofi-buku2 # rofi-buku -show # start a file browser super + n /usr/bin/nautilus super + shift + n ~/.config/regolith/bin/open-dirs.sh super + shift + i catfish ~/storage/Downloads/images --name Floating # Audio Controls {shift + XF86AudioLowerVolume, super + less} ~/.local/bin/volume-control down {shift + XF86AudioRaiseVolume, super + greater} ~/.local/bin/volume-control up XF86AudioLowerVolume ~/.local/bin/volume-control down-a-bit XF86AudioRaiseVolume ~/.local/bin/volume-control up-a-bit {XF86AudioMute, super + shift + m} ~/.local/bin/volume-control mute # ~/.local/bin/volume-control medium super + shift + less ~/.local/bin/volume-control quiet super + shift + greater ~/.local/bin/volume-control max # Music Player Daemon controls super + ctrl + p song-control toggle # dunstify --urgency normal --timeout 2000 --icon multimedia-player --hints=string:x-dunst-stack-tag:song "$(mpc toggle | head -n2)" super + ctrl + less song-control prev # dunstify --urgency normal --timeout 2000 --icon multimedia-player --hints=string:x-dunst-stack-tag:song "$(mpc prev | head -n1)" super + ctrl + greater song-control next # dunstify --urgency normal --timeout 2000 --icon multimedia-player --hints=string:x-dunst-stack-tag:song "$(mpc next | head -n1)" # bspwm hotkeys # # quit/restart bspwm super + shift + r [ $(printf "Yes\nNo" | rofi -dmenu -i -p "Restart BSPWM") = "Yes" ] && bspc wm -r super + q rofi -show session-menu -modi "session-menu:/home/setanta/.local/bin/rofi-power-menu" # [ $(printf "Yes\nNo" | rofi -dmenu -i -p "Logout") = "Yes" ] && bspc quit # close and kill super + {_,shift + }w bspc node -{c,k} # alternate between the tiled and monocle layout super + m bspc desktop -l next super + alt + n bsp-layout next | head -n1 | xargs dunstify super + alt + p bsp-layout previous | head -n1 | xargs dunstify super + alt + t bsp-layout set tall | head -n1 | xargs dunstify super + alt + shift + t bsp-layout set tiled | head -n1 | xargs dunstify # 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 # # focus the node in the given direction super + {_,shift + }{h,j,k,l} bspc node -{f,s} {west,south,north,east} super + {_,shift + }{Left,Down,Up,Right} 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 super + comma bspc node -f prev.local.!hidden.window super + period bspc node -f next.local.!hidden.window # focus the next/previous desktop in the current monitor super + {Prior,Next} bspc desktop -f {prev,next}.local.occupied super + ctrl + {Prior,Next} bspc desktop -f {prev,next}.local super + bracket{left,right} bspc desktop -f {prev,next}.local.occupied super + ctrl + bracket{left,right} bspc desktop -f {prev,next}.local # focus the last node/desktop super + {Tab,grave} 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}' super + alt + {1-9,0} bspc node -d '^{1-9,10}' --follow # # preselect # # preselect the direction super + ctrl + shift + {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 super + alt + space bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel # # move/resize # # move a floating window super + ctrl + {Left,Down,Up,Right} bspc node -v {-20 0,0 20,0 -20,20 0} super + ctrl + {h,j,k,l} bspc node -v {-20 0,0 20,0 -20,20 0} # expand/contract a window # super + control + shift + {h,j,k,l} # bspc node -z {left -20 0 || bspc node -z right -20 0, \ # bottom 0 20 || bspc node -z top 0 20,\ # top 0 -20 || bspc node -z bottom 0 -20,\ # right 20 0 || bspc node -z left 20 0} super + control + shift + {Left,Down,Up,Right} bspc node -z {left -20 0 || bspc node -z right -20 0, \ bottom 0 20 || bspc node -z top 0 20,\ top 0 -20 || bspc node -z bottom 0 -20,\ right 20 0 || bspc node -z left 20 0} # expand a window by moving one of its side outward super + alt + {h,j,k,l} bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} super + alt + {Left,Down,Up,Right} bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} # contract a window by moving one of its side inward super + alt + shift + {h,j,k,l} bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} super + alt + shift + {Left,Down,Up,Right} bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} # # Prayers # super + shift + o sxiv -bsf ~/Dropbox/Images/prayers/ -g 1700x1010 super + shift + z sxiv -bsf ~/Nextcloud/Images/imgs-ca-from-gdrive/Rosary-2/ -g 1430x1044 # # Calendar & Clock # super + c ~/.local/bin/mycal super + shift + c ~/.local/bin/mytime # # Screenshots # # Select area to capture Print SCREENSHOT_FILE=$HOME/Pictures/Screenshots/Screenshot_$(date +%Y%b%d-%H%M%S).png ; \ maim -s $SCREENSHOT_FILE && \ xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/`ls -1 -t ~/Pictures/Screenshots | head -1` && \ add_recent_file $SCREENSHOT_FILE && \ if [ "$(dunstify 'Screenshot taken.' --action='show,Show Image' --action='dismiss,Dismiss' -I $SCREENSHOT_FILE)" = "show" ]; then sxiv $SCREENSHOT_FILE; fi; # Capture the whole screen shift + Print SCREENSHOT_FILE=$HOME/Pictures/Screenshots/Screenshot_$(date +%Y%b%d-%H%M%S).png ; \ maim $SCREENSHOT_FILE && \ xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/`ls -1 -t ~/Pictures/Screenshots | head -1` && \ add_recent_file $SCREENSHOT_FILE && \ if [ "$(dunstify 'Screenshot taken.' --action='show,Show Image' --action='dismiss,Dismiss' -I $SCREENSHOT_FILE)" = "show" ]; then sxiv $SCREENSHOT_FILE; fi; # Capture focused window alt + Print SCREENSHOT_FILE=$HOME/Pictures/Screenshots/Screenshot_$(date +%Y%b%d-%H%M%S).png ; \ maim -i $(xdotool getactivewindow) $SCREENSHOT_FILE && \ xclip -selection clipboard -t image/png -i ~/Pictures/Screenshots/`ls -1 -t ~/Pictures/Screenshots | head -1` && \ add_recent_file $SCREENSHOT_FILE && \ if [ "$(dunstify 'Screenshot taken.' --action='show,Show Image' --action='dismiss,Dismiss' -I $SCREENSHOT_FILE)" = "show" ]; then sxiv $SCREENSHOT_FILE; fi; # vim:ft=bash