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.

186 lines
4.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # rules
  2. bpsc rule -a Emulator state=floating
  3. #
  4. # wm independent hotkeys
  5. #
  6. # terminal emulator
  7. super + Return
  8. kitty --single-instance
  9. # show time
  10. super + F11
  11. /home/marc/.config/scripts/notify-time
  12. # show sxhkd hotkeys in rofi
  13. super + slash
  14. show_help_sxhkd.sh
  15. # program launcher
  16. super + @space
  17. rofi -show run drun ssh window
  18. # File managers
  19. super + {e, shift + e}
  20. {kitty -e ranger, thunar}
  21. # make sxhkd reload its configuration files:
  22. super + Escape
  23. pkill -USR1 -x sxhkd
  24. #
  25. # bspwm hotkeys
  26. #
  27. # quit bspwm normally
  28. super + alt + Escape
  29. bspc quit
  30. # c: closes window of a program, k: kills all instances
  31. super + {_,shift + }w
  32. bspc node -{c,k}
  33. # alternate between the tiled and monocle layout
  34. super + m
  35. bspc desktop -l next
  36. # send the newest marked node to the newest preselected node
  37. super + y
  38. bspc node newest.marked.local -n newest.!automatic.local
  39. # swap the current node and the biggest node
  40. super + g
  41. bspc node -s biggest.local
  42. #
  43. # state/flags
  44. #
  45. # STATES:
  46. # tiled: its position and size are determined by the window tree
  47. # pseudo_tiled: a tiled window that automatically shrinks but doesn't
  48. # stretch bezond its floating size
  49. # floating: can be moved/resized freely. Still part of the window tree
  50. # fullscreen: fills monitor rectangle and has no borders
  51. # FLAGS:
  52. # hidden: is hidden and doesn't occupy any tiling space
  53. # sticky: stays in the focused desktop of its monitor
  54. # private: tries to keep the same tiling position/size
  55. # locked: ignores the node --close message
  56. # marked: useful for deferred actions. A marked node becomes unmarked
  57. # after being sent on a preselected node
  58. # urgent: has its urgency hint set. This flag is set externally
  59. # set the window state
  60. super + {t,shift + t,s,f}
  61. bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
  62. # toggle fullscreen / floating
  63. super + shift + f
  64. bspc node -t \~fullscreen
  65. # set the node flags
  66. super + ctrl + {m,x,y,z}
  67. bspc node -g {marked,locked,sticky,private}
  68. #
  69. # focus/swap
  70. #
  71. # reset sizes of nodes to bspwms defaults
  72. #super + b
  73. # bspc node @/ -{B,E}
  74. # rotate window layout by 90 degrees
  75. super + r
  76. bspc node @focused:/ -R 90
  77. # rotate programs within the given layout
  78. super + alt + r
  79. bspc node @focused:/ -C forward
  80. # focus the node in the given direction
  81. super + {_,shift + }{h,j,k,l}
  82. bspc node -{f,s} {west,south,north,east}
  83. # focus the node for the given path jump
  84. super + {p,b,comma,period}
  85. bspc node -f @{parent,brother,first,second}
  86. # focus the next/previous node in the current desktop
  87. super + {_,shift + }c
  88. bspc node -f {next,prev}.local
  89. alt + {_,shift + }Tab
  90. bspc node -f {next,prev}.local
  91. # focus the next/previous desktop in the current monitor
  92. super + bracket{left,right}
  93. bspc desktop -f {prev,next}.local
  94. # focus the last node/desktop
  95. super + {grave,Tab}
  96. bspc {node,desktop} -f last
  97. # focus the older or newer node in the focus history
  98. super + {o,i}
  99. bspc wm -h off; \
  100. bspc node {older,newer} -f; \
  101. bspc wm -h on
  102. # focus or send to the given desktop
  103. super + {_,shift + }{1-9,0}
  104. bspc {desktop -f,node -d} '^{1-9,10}'
  105. #
  106. # preselect
  107. #
  108. # preselect the direction
  109. super + ctrl + {h,j,k,l}
  110. bspc node -p {west,south,north,east}
  111. # preselect the ratio
  112. super + ctrl + {1-9}
  113. bspc node -o 0.{1-9}
  114. # cancel the preselection for the focused node
  115. super + ctrl + space
  116. bspc node -p cancel
  117. # cancel the preselection for the focused desktop
  118. super + ctrl + shift + space
  119. bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
  120. #
  121. # move/resize
  122. #
  123. # expand a window by moving one of its side outward
  124. super + alt + {h,j,k,l}
  125. bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
  126. # contract a window by moving one of its side inward
  127. super + alt + shift + {h,j,k,l}
  128. bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
  129. # move a floating window
  130. super + {Left,Down,Up,Right}
  131. bspc node -v {-20 0,0 20,0 -20,20 0}
  132. XF86MonBrightnessUp
  133. $HOME/.config/scripts/backlight_inc.sh
  134. XF86MonBrightnessDown
  135. $HOME/.config/scripts/backlight_dec.sh
  136. XF86AudioRaiseVolume
  137. pactl set-sink-volume @DEFAULT_SINK@ +1000
  138. XF86AudioLowerVolume
  139. pactl set-sink-volume @DEFAULT_SINK@ -1000
  140. XF86AudioMute
  141. pactl set-sink-mute @DEFAULT_SINK@ toggle