CLI config/dotfiles
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.

298 lines
8.0 KiB

  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. # sxhkdrc
  3. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. # Hotkey bindings for bspwm window management and other miscillaneous functions.
  5. # Reload configureation settings with <Alt> + <Escape>.
  6. # Get names from output of `xev` and key/mouse event.
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9. # Reload Settings
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. # make sxhkd reload its configuration files:
  12. alt + Escape
  13. pkill -USR1 -x sxhkd
  14. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. # Closing Things
  16. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  17. # exit bspwm
  18. super + alt + Escape
  19. pkill -x panel; bspc quit
  20. # close the current window
  21. alt + w
  22. bspc node --close
  23. # kill the current window
  24. alt + ctrl + shift + w
  25. bspc node --kill
  26. # toggle panel
  27. alt + super + p
  28. { pkill panel; pkill cat; bspc config top_padding 0 ,\
  29. /home/djsissom/.config/bspwm/panel/panel & }
  30. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31. # Window Management
  32. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. # focus/swap window in <direction>
  34. alt + {_,shift +} {h,j,k,l}
  35. bspc node --{focus,swap} {west,south,north,east}
  36. # preselect window split in <direction>
  37. alt + ctrl + {h,j,k,l}
  38. bspc node --presel-dir \~{west,south,north,east}
  39. # push window edge in <direction>
  40. alt + super + {h,j,k,l}
  41. bspc node --resize {left -10 0,bottom 0 10,top 0 -10,right 10 0}
  42. # pull window edge in <direction>
  43. alt + super + shift + {h,j,k,l}
  44. bspc node --resize {right -10 0,top 0 10,bottom 0 -10,left 10 0}
  45. # move floating window
  46. alt + super + {Left,Down,Up,Right}
  47. bpsc node --move {-10 0,0 10,0 -10,10 0}
  48. # set split of parent node
  49. alt + {1-9}
  50. bspc node @parent --ratio 0.{1-9}
  51. # send window to prev/next monitor/desktop
  52. alt + {_,ctrl +} shift + bracket{left,right}
  53. type={monitor,desktop}; \
  54. direction={prev,next}; \
  55. bspc node --to-$type $direction; \
  56. bspc $type --focus $direction
  57. # toggle window floating/fullscreen/pseudo-tiled
  58. alt + {s,f,t}
  59. bspc node --state \~{floating,fullscreen,pseudo_tiled}
  60. # select window backward/forward in history, preserving order
  61. alt + {o,i}
  62. bspc wm --record-history off; \
  63. bspc node --focus {older,newer}; \
  64. bspc wm --record-history on
  65. # select window backward/forward in history
  66. alt + {_,shift} + Tab
  67. bspc node --focus {prev.local,next.local}
  68. # swap window with last focused window
  69. alt + apostrophe
  70. bspc node --swap last
  71. # send window to preselection
  72. alt + Return
  73. bspc node --to-node last.!automatic
  74. # select splitting ratio of window
  75. alt + ctrl + {1-9}
  76. bspc node --presel-ratio 0.{1-9}
  77. # focus clockwise/counterclockwise window
  78. alt + {_,shift + }c
  79. bspc node --focus {next,prev}
  80. # swap with biggest window
  81. alt + shift + b
  82. bspc node --swap biggest
  83. # insert receptacle, or clear receptacles on current desktop
  84. alt + {_,shift} + r
  85. insert={true,false}; \
  86. $insert && bspc node --insert-receptacle || \
  87. for win in `bspc query -N -n .leaf.\!window.local`; do bspc node $win --kill; done
  88. # make fullscreen across all monitors
  89. super + alt + f
  90. bspc node --state \~floating; xdotool getactivewindow windowsize 5920 1080 windowmove 0 0
  91. #bspc node -t --state \~floating; bspc config -w focused border_width 0; xdotool getactivewindow windowsize 5920 1080 windowmove 0 0
  92. # move a floating window
  93. super + {Left,Down,Up,Right}
  94. bspc node -v {-10 0,0 10,0 -10,10 0}
  95. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  96. # Desktop Management
  97. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  98. # focus prev/next desktop
  99. alt + ctrl + bracket{left,right}
  100. bspc desktop --focus {prev,next}.local
  101. # focus prev/next desktop, all monitors
  102. alt + ctrl + {Left,Right}
  103. for i in \{1..3\}; do \
  104. direction={prev,next}; \
  105. bspc desktop --focus $direction; \
  106. bspc monitor --focus $direction; \
  107. done
  108. # flip the tree horizonally/vertically
  109. alt + {_,super +} {_,shift +} slash
  110. bspc node @{/,parent} --flip {vertical,horizontal}
  111. # select nodes (new shortcuts needed)
  112. alt + {p,b,comma,period}
  113. bspc node --focus @{parent,brother,first,second}
  114. # circulate window leaves through tree
  115. alt + {period,comma}
  116. bspc node @parent --circulate {backward,forward}
  117. # rotate tree
  118. alt + shift + {period,comma}
  119. bspc node @parent --rotate {90,270}
  120. # increase/decrease window gap size
  121. alt + {minus,equal}
  122. bspc config -d focused window_gap $((`bspc config -d focused window_gap` {+,-} 6 ))
  123. # window gap to zero
  124. alt + super + 0
  125. bspc config -d focused window_gap 0
  126. # toggle tiled/monacle layout
  127. alt + m
  128. bspc desktop -l next
  129. # balance windows to occupy equivalent area
  130. alt + b
  131. bspc node -B
  132. # reset windows rooted at node to original split ratio
  133. alt + e
  134. bspc node --equalize
  135. # focus/send window to desktop
  136. #alt + {_,shift + }{1-9,0}
  137. # bspc {desktop -f,window -d} $(bspc query -M -m)/{i,ii,iii,iv,v,vi,vii,viii,ix,x}
  138. # select previous desktop
  139. alt + grave
  140. bspc desktop --focus last
  141. # toggle the private flag to keep a node where it is (?)
  142. #alt + ctrl + p
  143. # bspc node --flag private
  144. # toggle visibility of all windows on current desktop of current monitor
  145. alt + shift + v
  146. bspc node @/ --flag hidden
  147. # toggle visibility of all windows on current desktop of all monitors
  148. alt + v
  149. for i in \{1..3\}; do \
  150. bspc monitor --focus next; \
  151. bspc node @/ --flag hidden; \
  152. done
  153. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154. # Monitor Management
  155. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  156. # focus monitor to the left/right
  157. alt + bracket{left,right}
  158. bspc monitor --focus {prev,next}
  159. # swap monitors
  160. alt + ctrl + super + bracket{left,right}
  161. direction={prev,next}; \
  162. bspc desktop --to-monitor $direction; \
  163. bspc monitor --focus $direction; \
  164. bspc desktop --to-monitor last; \
  165. bspc desktop --focus last
  166. # add merged virtual monitor
  167. alt + ctrl + super + m
  168. bspc wm -a merge 5920x1080+0+0
  169. alt + ctrl + super + shift + m
  170. bspc monitor merge -r
  171. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  172. # mouse actions
  173. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  174. # close window under pointer (Logitech MX Master)
  175. button10
  176. bspc node pointed --close
  177. # close window under pointer (Logitech MX Master 2S)
  178. ctrl + alt + Tab
  179. bspc node pointed --close
  180. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181. # wm independent hotkeys
  182. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183. # open a terminal
  184. alt + backslash
  185. urxvt
  186. # run dmenu launcher
  187. alt + space
  188. dmenu_recent -x 400 -w 1120 -y 525 -h 25 -o 0.75 -dim 0.5 -s 0
  189. #XDG_CURRENT_DESKTOP=KDE dmenu_recent -x 400 -w 1120 -y 525 -h 25 -o 0.75 -dim 0.5 -s 0
  190. # volume controls
  191. XF86AudioRaiseVolume
  192. amixer set Speaker 1%+
  193. XF86AudioLowerVolume
  194. amixer set Speaker 1%-
  195. XF86AudioMute
  196. amixer set PCM toggle
  197. #amixer set Speaker toggle
  198. # take a screenshot
  199. Print
  200. scrot -e 'mv $f ~/Images/Screenshots/.'
  201. shift + Print
  202. scrot --focused -e 'mv $f ~/Images/Screenshots/.'
  203. alt + Print
  204. scrot --select -e 'mv $f ~/Images/Screenshots/.'
  205. # refresh background image
  206. super + b
  207. feh --bg-center --no-xinerama ~/Images/DesktopImages/current
  208. # run xbmc
  209. super + x
  210. env SDL_VIDEO_FULLSCREEN_HEAD=1 kodi
  211. # turn on tv and mirror central monitor
  212. super + t
  213. xrandr --output HDMI-0 --auto --same-as DVI-D-0
  214. # lock screen
  215. super + l
  216. i3lock --ignore-empty-password --show-failed-attempts --image=/home/djsissom/Local/share/wallpaper/current.png
  217. #i3lock --ignore-empty-password --tiling --image=/home/djsissom/Local/share/wallpaper/current.png
  218. #i3lock --ignore-empty-password --dpms --inactivity-timeout 60 --tiling --image=/home/djsissom/Images/Desktop\ Images/current.png
  219. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  220. # End
  221. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~