You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

224 lines
4.8KB

  1. # vim: sw=1:fdm=indent:fdl=0
  2. #
  3. # bspwm hotkeys
  4. #
  5. # Quit bspwm
  6. super + ctrl + Escape
  7. pkill -x panel; bspc quit
  8. ## Desktop
  9. # Move desktop (with focused node) to the left
  10. super + {_,shift} + v
  11. bspc {desktop -f prev.local,node -d prev.local --follow}; \
  12. clear_desktops
  13. # Move desktop (with focused node) to the right
  14. super + {_,shift} + l
  15. last=`cat /tmp/lastdesk`; \
  16. if [ `bspc query -D -d focused --names` -eq "$last" ]; then; \
  17. let "last += 1"; \
  18. echo $last > /tmp/lastdesk; \
  19. bspc monitor -a $last; \
  20. fi; \
  21. bspc {desktop -f next.local,node -d next.local --follow}; \
  22. clear_desktops
  23. # Send node to a new empty desktop at the far right (and follow)
  24. super + {_,shift} + j
  25. echo `bspc query -D -d focused --names` > /tmp/desk; \
  26. last=`cat /tmp/lastdesk`; \
  27. let "last += 1"; \
  28. echo $last > /tmp/lastdesk; \
  29. bspc monitor -a $last; \
  30. bspc node -d "$last" {_,--follow}; \
  31. clear_desktops
  32. # Go to last node and back (optionally carrying a node)
  33. super + {_,shift} + n
  34. old=`cat /tmp/desk`; \
  35. current=`bspc query -D -d focused --names`; \
  36. last=`cat /tmp/lastdesk`; \
  37. if [[ "$current" == "$last" ]]; then; \
  38. target="$old"; \
  39. else; \
  40. target="$last"; \
  41. echo $current > /tmp/desk; \
  42. fi; \
  43. bspc {desktop -f "$target",node -d "$target" --follow}; \
  44. clear_desktops
  45. # Rotate desktop
  46. super + {q,h}
  47. bspc node @focused:/ -R {270,90}
  48. # Toggle monitor focus
  49. super + m
  50. bspc monitor -f next
  51. # Move node to the other monitor
  52. super + shift + m
  53. win=`bspc query -N -n focused`; \
  54. bspc node -m next; \
  55. bspc monitor -f next; \
  56. bspc node -f $win; \
  57. clear_desktops
  58. # Go to desktop
  59. super + {quotedbl,guillemotleft,guillemotright,parenleft,parenright,Delete,at,plus,minus,slash}
  60. bspc desktop -f {^1,^2,^3,^4,^5,^6,^7,^8,^9,^10}; \
  61. clear_desktops
  62. # Move node to desktop n
  63. super + shift + {quotedbl,guillemotleft,guillemotright,parenleft,parenright,Delete,at,plus,minus,slash}
  64. bspc node -d {^1,^2,^3,^4,^5,^6,^7,^8,^9,^10} --follow; \
  65. clear_desktops
  66. # Balance desktop
  67. super + k
  68. bspc node @focused:/ -B
  69. ## node
  70. # Focus/swap to DIR
  71. super + {_,shift + }{t,s,d,r}
  72. bspc node -{f,s} {west,south,north,east}
  73. # Focus to CYCLE_DIR
  74. super + w
  75. bspc node -f next.local
  76. # Preselect node to DIR
  77. super + ctrl + {t,s,d,r}
  78. bspc node -p \~{west,south,north,east}
  79. # Resize node to DIR
  80. super + alt + {t,s,d,r}
  81. bspc node @{west -r -10,south -r +10,north -r -10,east -r +10}
  82. super + alt + shift + {t,s,d,r}
  83. bspc node @{east -r -10,north -r +10,south -r -10,west -r +10}
  84. # Toggle floating/pseudo_tiles/fullscreen
  85. super + {y,x,period}
  86. bspc node -t \~{floating,tiled,fullscreen}
  87. # Move to presel
  88. super + b
  89. bspc node -n last.!automatic
  90. # Close node
  91. super + {g,agrave}
  92. bspc node -c
  93. # wm independent hotkeys
  94. #
  95. # File explorer
  96. super + space
  97. popup Ranger ranger
  98. # Popup utils
  99. # Music
  100. super + a
  101. popup Music_playlist ncmpcpp -s playlist ; \
  102. popup Music_media ncmpcpp -s media_library
  103. super + eacute
  104. popup Music_playlist_home ncmpcpp -s playlist -h 192.168.0.121 ; \
  105. popup Music_media_home ncmpcpp -s media_library -h 192.168.0.121
  106. # Torrent
  107. super + i
  108. popup Torrent transmission-remote-cli
  109. # xdotool search --onlyvisible --classname Torrent windowunmap ||\
  110. # xdotool search --classname Torrent windowmap ||\
  111. # kitty --name Torrent transmission-remote-cli
  112. # Wiki
  113. super + u
  114. popup Wiki nvim ~/Private/vimwiki/index.wiki
  115. # Volume
  116. super + e
  117. popup Volume pulsemixer
  118. # Weather
  119. super + p
  120. xdotool search --onlyvisible --classname Meteo windowkill ||\
  121. kitty --override background_opacity=0 -o background='#000000' -o font_size=9 --hold --name Meteo meteo_display && meteo
  122. # Pin pop-up window
  123. super + shift + space
  124. bspc node -g sticky=off -t tiled &&\
  125. xdotool getactivewindow set_window --classname urxvt
  126. # Launcher
  127. super + alt + space
  128. rofi -font "monofur for Powerline 18" -show
  129. # Show conky
  130. super + c
  131. if [ `bspc config -d focused left_padding` -gt 0 ]; then;\
  132. start=500;\
  133. step=-20;\
  134. end=0;\
  135. else;\
  136. start=0;\
  137. step=20;\
  138. end=500;\
  139. fi;\
  140. for pad in `seq $start $step $end`; do;\
  141. bspc config -d focused left_padding $pad;\
  142. done
  143. # Open terminal
  144. super + ctrl + space
  145. kitty
  146. # vim everywhere
  147. super + Return
  148. kitty --name evimwhere nvim '+au BufWritePost * %y+' /dev/null -c 'startinsert';\
  149. sleep .5;\
  150. xdotool key ctrl+v
  151. # make sxhkd reload its configuration files:
  152. super + Escape
  153. pkill -USR1 -x sxhkd
  154. # Lock
  155. super + z
  156. slimlock
  157. XF86Display
  158. arandr
  159. XF86MonBrightnessUp
  160. xbacklight +5
  161. XF86MonBrightnessDown
  162. xbacklight -5
  163. XF86AudioRaiseVolume
  164. pactl set-sink-volume 0 +4%;\
  165. dunstify -r 1234 "`echo -e "\uf028"` `volume -f '%i'`"
  166. XF86AudioLowerVolume
  167. pactl set-sink-volume 0 -4%;\
  168. dunstify -r 1234 "`echo -e "\uf027"` `volume -f '%i'`"
  169. XF86AudioMute
  170. pactl set-sink-mute 0 toggle;\
  171. dunstify -r 1234 "`echo -e "\uf026"` `volume -f '%s' -d hw:1`"
  172. XF86AudioPlay
  173. mpc toggle;\
  174. dunstify -r 1234 "`echo -e "\uf04b\uf04c"`"
  175. Print
  176. scrot
  177. alt + Print
  178. scrot -s