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.

179 lines
4.0 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # rules
  2. bpsc rule -a Emulator state=floating
  3. #
  4. # wm independent hotkeys
  5. #
  6. # terminal emulator
  7. super + Return
  8. alacritty
  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. {alacritty -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. # focus the next/previous desktop in the current monitor
  87. super + bracket{left,right}
  88. bspc desktop -f {prev,next}.local
  89. # focus the last node/desktop
  90. super + {grave,Tab}
  91. bspc {node,desktop} -f last
  92. # focus the older or newer node in the focus history
  93. super + {o,i}
  94. bspc wm -h off; \
  95. bspc node {older,newer} -f; \
  96. bspc wm -h on
  97. # focus or send to the given desktop
  98. super + {_,shift + }{1-9,0}
  99. bspc {desktop -f,node -d} '^{1-9,10}'
  100. #
  101. # preselect
  102. #
  103. # preselect the direction
  104. super + ctrl + {h,j,k,l}
  105. bspc node -p {west,south,north,east}
  106. # preselect the ratio
  107. super + ctrl + {1-9}
  108. bspc node -o 0.{1-9}
  109. # cancel the preselection for the focused node
  110. super + ctrl + space
  111. bspc node -p cancel
  112. # cancel the preselection for the focused desktop
  113. super + ctrl + shift + space
  114. bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
  115. #
  116. # move/resize
  117. #
  118. # expand a window by moving one of its side outward
  119. super + alt + {h,j,k,l}
  120. bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
  121. # contract a window by moving one of its side inward
  122. super + alt + shift + {h,j,k,l}
  123. bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
  124. # move a floating window
  125. super + {Left,Down,Up,Right}
  126. bspc node -v {-20 0,0 20,0 -20,20 0}
  127. XF86MonBrightnessUp
  128. $HOME/.config/scripts/backlight_inc.sh
  129. XF86MonBrightnessDown
  130. $HOME/.config/scripts/backlight_dec.sh
  131. XF86AudioRaiseVolume
  132. pactl set-sink-volume @DEFAULT_SINK@ +1000
  133. XF86AudioLowerVolume
  134. pactl set-sink-volume @DEFAULT_SINK@ -1000
  135. XF86AudioMute
  136. pactl set-sink-mute @DEFAULT_SINK@ toggle