dotfiles

My dotfiles: zsh, lf, sxiv, i3, ranger, mpd and more
Log | Files | Refs | Submodules | README | LICENSE

sxhkdrc (6592B)


      1 # The Simple X Hotkey Daemon is the program used by LARBS to map most of the
      2 # dwm-independent commands.  This file is pretty readable, so I'll let you read
      3 # it.
      4 
      5 # The keys NOT bound here by sxhkd, but by dwm or i3 are:
      6 # The t thru p keys on the top row
      7 # The f thru ; keys on the home row
      8 # The b key on the bottom row (hides the bar in either case)
      9 
     10 # Basic binds
     11 super + Return
     12 	$TERMINAL
     13 super + d
     14 	dmenu_run
     15 super + r
     16 	$TERMINAL -e $FILE
     17 super + e
     18 	$TERMINAL -e neomutt; pkill -RTMIN+12 blocks
     19 super + m
     20 	$TERMINAL -e ncmpcpp
     21 super + n
     22 	$TERMINAL -e newsboat
     23 super + c
     24 	$TERMINAL -e calcurse
     25 super + v
     26 	$TERMINAL -e nvim -c VimwikiIndex
     27 super + shift + a
     28 	$TERMINAL -e pulsemixer
     29 super + shift + c
     30 	camtoggle
     31 super + shift + e
     32 	tutorialvids
     33 super + w
     34 	$TERMINAL -e sudo nmtui
     35 super + shift + w
     36 	$BROWSER
     37 
     38 # Et cetera...
     39 super + grave
     40 	dmenuunicode
     41 super + Scroll_Lock
     42 	killall screenkey || screenkey
     43 super + Insert
     44 	showclip
     45 super + shift + x
     46 	prompt "Shutdown computer?" "sudo -A shutdown -h now"
     47 super + shift + BackSpace
     48 	prompt "Reboot computer?" "sudo -A reboot"
     49 super + shift + Escape
     50 	prompt 'Leave Xorg?' 'killall Xorg'
     51 super + x
     52 	ifinstalled slock && ( slock & xset dpms force off ; mpc pause ; pauseallmpv )
     53 XF86Launch1
     54 	xset dpms force off
     55 XF86TouchpadToggle
     56 	(synclient | grep "TouchpadOff.*1" && synclient TouchpadOff=0) || synclient TouchpadOff=1
     57 XF86Touchpad{Off,On}
     58 	synclient TouchpadOff={1,0}
     59 XF86MonBrightnessDown
     60 	xbacklight -dec 15
     61 XF86MonBrightnessUp
     62 	xbacklight -inc 15
     63 
     64 # Recording
     65 # Take screenshot
     66 Print
     67 	maim pic-full-$(date '+%y%m%d-%H%M-%S').png
     68 # Pick screenshot type
     69 shift + Print
     70 	maimpick
     71 # Print: Record audio or video; Del: kill recording
     72 super + Print
     73 	dmenurecord
     74 super + Delete
     75 	dmenurecord kill
     76 
     77 # Pause audio
     78 super + p
     79 	mpc toggle
     80 super + shift + p
     81 	mpc pause; pauseallmpv
     82 # Changes to next/previous tracks
     83 super + {comma,period}
     84 	mpc {prev,next}
     85 # Restart track
     86 super + shift + less
     87 	mpc seek 0%
     88 # Seek foward in song
     89 super + {_,shift +} bracketright
     90 	mpc seek +{10,120}
     91 # Seek backward in song
     92 super + {_,shift +} bracketleft
     93 	mpc seek -{10,120}
     94 # Increase volume
     95 super + {equal,plus}
     96 	amixer sset Master {5,15}%+; pkill -RTMIN+10 blocks
     97 # Decrease volume
     98 super {_,shift +} + minus
     99 	amixer sset Master {5,15}%-; pkill -RTMIN+10 blocks
    100 super + shift + m
    101 	amixer sset Master toggle; pkill -RTMIN+10 blocks
    102 
    103 # Audiokeys
    104 XF86AudioMute
    105 	amixer sset Master toggle; pkill -RTMIN+10 blocks
    106 XF86Audio{Raise,Lower}Volume
    107 	amixer sset Master 5%{+,-}; pkill -RTMIN+10 blocks
    108 XF86Audio{Next,Prev}
    109 	mpc {next,prev}
    110 XF86Audio{Pause,Play,Stop}
    111 	mpc {pause,play,stop}
    112 XF86Audio{Rewind,Forward}
    113 	mpc seek {-,+}10
    114 XF86AudioRecord
    115 	dmenurecord
    116 XF86AudioMedia
    117 	$TERMINAL -e ncmpcpp
    118 
    119 XF86PowerOff
    120 	prompt "Shutdown computer?" "sudo -A shutdown -h now"
    121 XF86Calculator
    122 	$TERMINAL -e bc
    123 XF86Sleep
    124 	prompt 'Hibernate computer?' 'sudo -A zzz'
    125 XF86WWW
    126 	$BROWSER
    127 XF86DOS
    128 	$TERMINAL
    129 XF86ScreenSaver
    130 	mpc pause; pauseallmpv; i3lock -e -f -c 1d2021; xset dpms force off
    131 XF86TaskPane
    132 	$TERMINAL -e htop
    133 XF86Mail
    134 	$TERMINAL -e neomutt
    135 XF86MyComputer
    136 	$TERMINAL -e $FILE /
    137 
    138 # Function keys
    139 super + shift + F1
    140 	grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." )
    141 # Show readme
    142 super + F1
    143 	groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
    144 # F2 restarts either dwm or i3 and is bound in each.
    145 # Change display
    146 super + F3
    147 	displayselect
    148 # Hibernate
    149 super + F4
    150 	prompt 'Hibernate computer?' 'sudo -A zzz -Z'
    151 super + F5 is unbound.
    152 # Start torrent daemon/open interface
    153 super + F6
    154 	torwrap
    155 # toggle torrent daemon
    156 super + F7
    157 	td-toggle
    158 # sync email
    159 super + F8
    160 	mailsync
    161 # Mount a USB drive or Android device
    162 super + {F9,F10}
    163 	{dmenumount,dmenuumount}
    164 
    165 
    166 
    167 # close and kill
    168 super + {_,shift + }q
    169 	bspc node -{c,k}
    170 
    171 # alternate between the tiled and monocle layout
    172 super + {_,shift + }f
    173 	bspc {desktop -l next,node -t ~fullscreen}
    174 
    175 # rotate current node 90 degrees
    176 super + y
    177 	bspc node @focused:/ -R 90
    178 
    179 # swap the current node and the biggest local node
    180 super + space
    181 	bspc node -s biggest.local || bspc node -s next.local
    182 
    183 #
    184 # state/flags
    185 #
    186 
    187 # set the window state
    188 #super + {t,shift + t,s}
    189 #bspc node -t {tiled,pseudo_tiled,floating}
    190 
    191 super + shift + space
    192 	bspc node focused -t \~floating
    193 
    194 # focus/swap
    195 
    196 # focus the node in the given direction
    197 super + {_,shift + }{h,j,k,l}
    198 	bspc node -{f,s} {west,south,north,east}
    199 
    200 # focus the node for the given path jump
    201 super + {p,b,comma,period}
    202 	bspc node -f @{parent,brother,first,second}
    203 
    204 super + {g,semicolon}
    205 	bspc desktop {prev,next}.occupied --focus
    206 super + {Prior,Next}
    207 	bspc desktop {prev,next}.occupied --focus
    208 super + {Tab,backslash}
    209 	bspc desktop last --focus
    210 
    211 # focus or swap the next node
    212 super + {_,shift + }c
    213 	bspc node -{f,s} next.local
    214 
    215 # focus the older or newer node in the focus history
    216 
    217 # focus or send to the given desktop
    218 super + {_,shift + }{1-9,0}
    219 	bspc {desktop -f,node -d} ^{1-9,10}
    220 
    221 # preselect the direction
    222 #super + {u,o}
    223 #bspc node -p {south,east}
    224 
    225 # preselect the ratio
    226 super + ctrl + {1-9}
    227 	bspc node -o 0.{1-9}
    228 
    229 # cancel the preselection for the focused node
    230 super + ctrl + space
    231 	bspc node -p cancel
    232 
    233 # cancel the preselection for the focused desktop
    234 #super + space
    235 #bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
    236 
    237 # expand a window by moving one of its side outward
    238 super + shift + {y,u,i,o}
    239 	bspc node -z {right -20 0,bottom 0 20,bottom 0 -20,right 20 0}
    240 
    241 # contract a window by moving one of its side inward
    242 
    243 # move a floating window
    244 super + {Left,Down,Up,Right}
    245 	bspc node -v {-20 0,0 20,0 -20,20 0}
    246 
    247 # Toggle gaps
    248 super + shift + d
    249 	bspc config window_gap {0,15}
    250 # Increase/descrease gap size
    251 super { ,+ shift }+ z
    252 	bspc config window_gap $(($(bspc config window_gap) {+,-} 3))
    253 
    254 super + u
    255 	cat /tmp/dropdown | xargs -I win bspc node win --flag hidden;bspc node -f win
    256 
    257 # Make a windoww sticky/non-sticky
    258 super + o
    259 	bspc node -g sticky={on,off}
    260 
    261 # remove and restore polybar
    262 #super + b
    263 #\{ pgrep polybar && \{ killall polybar ; bspc config top_padding 0 \} \} || \{ launch_polybar ; bspc config top_padding 24 \}
    264 
    265 super + {i,o}
    266 	bspc node -f {prev,next}.local
    267 super + shift + n
    268 	bspc node focused -t \~floating ; hover right
    269 super + shift + b
    270 	bspc node focused -t \~floating ; hover left