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.

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