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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 + Home
  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. #
  33. # bspwm hotkeys
  34. #
  35. # close and kill
  36. super + {_,shift + }w
  37. bspc node -{c,k}
  38. # alternate between the tiled and monocle layout
  39. super + m
  40. bspc desktop -l next
  41. # if current node is automatic, send it to the last manual, otherwise pull the last leaf
  42. super + y
  43. bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
  44. # swap the current node and the biggest node
  45. super + g
  46. bspc node -s biggest.local
  47. # toggle pointer focus
  48. super + alt + p
  49. bspc config focus_follows_pointer {true,false}
  50. #
  51. # state/flags
  52. #
  53. # set the window state
  54. super + {t,shift + t,s,f}
  55. bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
  56. # set the node flags
  57. super + ctrl + {w,x,y,z}
  58. bspc node -g {hidden,locked,sticky,private}
  59. super + ctrl + shift + w
  60. bspc node $(bspc query -N -d focused -n .hidden | tail -1) -g hidden=off
  61. #
  62. # focus/swap
  63. #
  64. super {_,+ shift} + r
  65. bspc node @/ -R {90,270}
  66. # rotate leaves of tree
  67. super + shift + {comma,period}
  68. bspc desktop -R {90,270}
  69. # focus/swap the node in the given direction
  70. super + {_,shift + }{h,j,k,l}
  71. bspc node -{f,s} {west,south,north,east}
  72. # focus the node for the given path jump
  73. super + {p,b,comma,period}
  74. bspc node -f @{parent,brother,first,second}
  75. # focus the next/previous node in the current desktop
  76. super + {_,shift + }c
  77. bspc node -f {next,prev}.local
  78. # focus the next/previous desktop
  79. super + bracket{left,right}
  80. bspc desktop -f {prev,next}
  81. # focus the last node/desktop
  82. super + {grave,Tab}
  83. bspc {node,desktop} -f last
  84. # focus the older or newer node in the focus history
  85. super + {o,i}
  86. bspc wm -h off; \
  87. bspc node {older,newer} -f; \
  88. bspc wm -h on
  89. # focus/send to the given desktop
  90. super + {_,shift + }{1-9,0}
  91. bspc {desktop -f,node -d} '^{1-9,10}'
  92. #
  93. # preselect
  94. #
  95. # preselect the direction
  96. super + ctrl + {h,j,k,l}
  97. bspc node -p {west,south,north,east}
  98. # preselect the ratio
  99. super + ctrl + {1-9}
  100. bspc node -o 0.{1-9}
  101. # cancel the preselection for the focused node
  102. super + ctrl + space
  103. bspc node -p cancel
  104. #
  105. # move/resize
  106. #
  107. # expand the tiled space in the given direction
  108. super + alt + {h,j,k,l}
  109. bspc node {@west -r -,@south -r +,@north -r -,@east -r +}10
  110. # contract the tiled space in the given direction
  111. super + alt + shift + {h,j,k,l}
  112. bspc node {@east -r -,@north -r +,@south -r -,@west -r +}10
  113. # move a floating window
  114. super + {Left,Down,Up,Right}
  115. bspc node -v {-20 0, 0 20, 0 -20,20 0}