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.

sxhkd 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #
  2. # wm independent hotkeys
  3. #
  4. # power operations
  5. super + End ; {s,S,alt + s,r,p}
  6. loginctl {suspend,hibernate,hybrid-sleep,reboot,poweroff}
  7. super + End ; b
  8. xset dpms force off
  9. # rofi
  10. super + shift + {End,Insert,Return}
  11. exec {rofi-powermenu,rofi-bspwm-unhide,rofi -modi emoji -show emoji}
  12. super + shift + space
  13. exec rofi -modi calc -show calc
  14. super + space
  15. exec rofi -show drun
  16. alt + Tab
  17. rofi-windowswitcher
  18. # applications
  19. super + Return
  20. exec kitty -1
  21. super + shift + {m,v}
  22. exec {mpv "$(xclip -sel c -o)",pavucontrol-qt}
  23. super + shift + {n,p}
  24. exec kitty -1 --class=kittyfloat -o initial_window_width=900 -o initial_window_height=900 \
  25. {ncmpcpp,htop}
  26. super + Insert
  27. carpalx-helper
  28. {_,ctrl} + Print
  29. screenshot {-s -u,-u}
  30. super + {_,shift + }Print
  31. exec {peek -t, peek}
  32. {shift,shift + alt,ctrl,ctrl + alt,alt} + Home
  33. dunstctl {close,close-all,history-pop,context,action 0}
  34. # Media
  35. XF86Audio{Play,Pause,Prev,Next}
  36. mpc {toggle,pause,prev,next}
  37. #
  38. # bspwm hotkeys
  39. #
  40. # close and kill
  41. super + {_,shift + }w
  42. bspc node -{c,k}
  43. # alternate between the tiled and monocle layout
  44. super + m
  45. bspc desktop -l next
  46. # if current node is automatic, send it to the last manual, otherwise pull the last leaf
  47. super + y
  48. bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
  49. # swap the current node and the biggest local window
  50. super + g
  51. bspc node -s biggest.local.window
  52. # toggle pointer focus
  53. super + alt + p
  54. bspc config focus_follows_pointer {true,false}
  55. #
  56. # state/flags
  57. #
  58. # set the window state
  59. super + {t,shift + t,s,f}
  60. bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
  61. # set the node flags
  62. super + ctrl + {w,x,y,z}
  63. bspc node -g {hidden,locked,sticky,private}
  64. super + ctrl + shift + w
  65. bspc node $(bspc query -N -d focused -n .hidden | tail -1) -g hidden=off
  66. #
  67. # focus/swap
  68. #
  69. super {_,+ shift} + r
  70. bspc node @/ -R {90,270}
  71. # rotate leaves of tree
  72. super + shift + {comma,period}
  73. bspc desktop -R {90,270}
  74. # focus/swap the node in the given direction
  75. super + {_,shift + }{h,j,k,l}
  76. bspc node -{f,s} {west,south,north,east}
  77. # focus the node for the given path jump
  78. super + {p,b,comma,period}
  79. bspc node -f @{parent,brother,first,second}
  80. # focus the next/previous window in the current desktop
  81. super + {_,shift + }c
  82. bspc node -f {next,prev}.local.!local.window
  83. # focus the next/previous desktop
  84. super + bracket{left,right}
  85. bspc desktop -f {prev,next}
  86. # focus the last node/desktop
  87. super + {grave,Tab}
  88. bspc {node,desktop} -f last
  89. # focus the older or newer node in the focus history
  90. super + {o,i}
  91. bspc wm -h off; \
  92. bspc node {older,newer} -f; \
  93. bspc wm -h on
  94. # focus/send to the given desktop
  95. {_,shift + }{super,mode_switch} + {1-9,0}
  96. bspc {desktop -f,node -d} {DisplayPort,HDMI-A}-3:'^{1-9,10}'
  97. # focus/send to another monitor
  98. super + minus
  99. bspc monitor -f last
  100. super + underscore
  101. bspc node -m last --follow
  102. #
  103. # preselect
  104. #
  105. # preselect the direction
  106. super + ctrl + {h,j,k,l}
  107. bspc node -p {west,south,north,east}
  108. # preselect the ratio
  109. super + ctrl + {1-9}
  110. bspc node -o 0.{1-9}
  111. # cancel the preselection for the focused node
  112. super + ctrl + space
  113. bspc node -p cancel
  114. #
  115. # move/resize
  116. #
  117. # expand the tiled space in the given direction
  118. super + alt + {h,j,k,l}
  119. bspc node {@west -r -,@south -r +,@north -r -,@east -r +}10
  120. # contract the tiled space in the given direction
  121. super + alt + shift + {h,j,k,l}
  122. bspc node {@east -r -,@north -r +,@south -r -,@west -r +}10
  123. # move a floating window
  124. super + {Left,Down,Up,Right}
  125. bspc node -v {-20 0, 0 20, 0 -20,20 0}