# # General keybindings. # # Basic. super + {_,shift + }Return $TERMINAL { ,-e tmuxed} super + d dmenu_run -fn "Noto Sans Mono:size=12" -nb "$(xresource background)" -nf "$(xresource foreground)" -sb "$(xresource color4)" -sf "$(xresource color0)" super + Escape pkill -USR1 -x sxhkd # Inside polybar_panel, it actually kills it and then starts it again. super + shift + Escape polybar_panel # Change keyboard layout. super + space setxkbmap -option grp:win_space_toggle latam,us # Run programs. super + shift + w $BROWSER super + shift + f $TERMINAL -e $FILE super + Delete $TERMINAL -e htop # Screenshots. {_,super + , super + shift + } Print $SSMGR {gui,full -c,full -p $SSPATH} # # bspwm keybindings. # # Quit/restart bspwm. # super + shift + {e,r} # bspc {quit,wm -r} super + shift + r bspc wm -r # Close and kill. super + {shift + alt + ,shift + }q bspc node -{k,c} # Alternate between the tiled and monocle layout. super + m bspc desktop -l next # 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} # 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 # Focus the next/previous desktop in the current monitor. super + brace{left,right} bspc desktop -f {prev,next}.local # Focus the last node/desktop. super + {_,shift + } Tab 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}' # # Preselect. # # Preselect the 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. super + ctrl + space bspc node -p cancel # Cancel the preselection for the focused desktop. super + ctrl + shift + space bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel # # Move/resize. # # Smart resize, will grow or shrink depending on location. # Will always grow for floating nodes. super + alt + {h,j,k,l} 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 # Move a floating window. super + {Left,Down,Up,Right} n=10; \ bspc node -v {-$n 0,0 $n,0 -$n,$n 0} # # Extra XF86 keys. # {_,shift + } XF86AudioRaiseVolume pactl set-sink-volume @DEFAULT_SINK@ +{2,10}% {_,shift + } XF86AudioLowerVolume pactl set-sink-volume @DEFAULT_SINK@ -{2,10}% XF86AudioMute pactl set-sink-mute @DEFAULT_SINK@ toggle # Actually, not required to separate mpc and pctl here nor # on next, but still... {_,shift + } XF86AudioPrev {mpc -q prev, playerctl previous} {_,shift + } XF86AudioNext {mpc -q, playerctl} next {_,shift + } XF86AudioPlay {mpc -q toggle, playerctl play-pause} # XF86AudioMedia # Same as XF86AudioPlay in my keyboard. That's why the 'play-pause' option is used. # XF86AudioPause # XF86AudioStop # XF86AudioRecord # XF86AudioRewind # XF86AudioForward # XF86AudioMicMute # pactl set-source-mute @DEFAULT_SOURCE@ toggle # XF86PowerOff # XF86Copy # XF86Open # XF86Past # XF86Cut # XF86MenuKB # XF86Calculator # This binding is typically mapped by systemd automatically. # XF86Sleep # XF86WakeUp # XF86Explorer # XF86Send # XF86Xfer # XF86WWW # XF86DOS # XF86ScreenSaver # XF86RotateWindows # XF86TaskPane # XF86Favorites # XF86MyComputer # XF86Back # XF86Forward # XF86Eject # XF86Phone # XF86Tools # XF86HomePage # XF86Reload # XF86ScrollUp # XF86ScrollDown # XF86New # XF86LaunchA # XF86LaunchB # XF86Launch2 # XF86Launch3 # XF86Launch4 # XF86Launch5 # XF86Launch6 # XF86Launch7 # XF86Launch8 # XF86Launch9 # XF86TouchpadToggle # XF86TouchpadOn # XF86TouchpadOff # XF86Suspend # XF86Close # XF86WebCam # XF86Mail # XF86Messenger # XF86Search # XF86Go # XF86Finance # XF86Game # XF86Shop # XF86MonBrightnessDown # XF86MonBrightnessUp # XF86Display # XF86KbdLightOnOff # XF86KbdBrightnessDown # XF86KbdBrightnessUp # XF86Reply # XF86MailForward # XF86Save # XF86Documents # XF86Battery # XF86Bluetooth # XF86WLAN