My personal dotfiles
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.

sxhkdrc 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #
  2. # wm independent hotkeys
  3. #
  4. # terminal emulator
  5. super + Return
  6. terminator
  7. # emacs
  8. super + backslash
  9. emacs
  10. # chrome
  11. super + c
  12. chromium
  13. # program launcher
  14. super + space
  15. rofi -show run -font "snap 10" -o 85
  16. # make sxhkd reload its configuration files:
  17. super + Escape
  18. pkill -USR1 -x sxhkd
  19. # volume keys
  20. XF86AudioRaiseVolume
  21. amixer -D pulse sset Master 2%+
  22. XF86AudioLowerVolume
  23. amixer -D pulse sset Master 2%-
  24. XF86AudioMute
  25. amixer set Master toggle
  26. # brightness keys
  27. XF86MonBrightnessUp
  28. xbacklight -inc 5
  29. XF86MonBrightnessDown
  30. xbacklight -dec 5
  31. # swap keyboard layout
  32. super + p
  33. ~/bin/toggle-layout
  34. # swap keyboard layout
  35. super + r
  36. ~/bin/toggle-russian
  37. #
  38. # bspwm hotkeys
  39. #
  40. # quit bspwm normally
  41. super + alt + Escape
  42. bspc quit
  43. # close and kill
  44. super + shift + q
  45. bspc node -c
  46. # alternate between the tiled and monocle layout
  47. super + m
  48. bspc desktop -l next
  49. # if the current node is automatic, send it to the last manual, otherwise pull the last leaf
  50. super + y
  51. bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
  52. # swap the current node and the biggest node
  53. super + g
  54. bspc node -s biggest
  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 + {x,y,z}
  63. bspc node -g {locked,sticky,private}
  64. #
  65. # focus/swap
  66. #
  67. # focus the node in the given direction
  68. super + {_,shift + }{h,j,k,l}
  69. bspc node -{f,s} {west,south,north,east}
  70. # focus the node for the given path jump
  71. super + {p,b,comma,period}
  72. bspc node -f @{parent,brother,first,second}
  73. # focus the next/previous node
  74. super + {_,shift + }c
  75. bspc node -f {next,prev}
  76. # focus the next/previous desktop
  77. super + bracket{left,right}
  78. bspc desktop -f {prev,next}
  79. # focus the last node/desktop
  80. super + {grave,Tab}
  81. bspc {node,desktop} -f last
  82. # focus the older or newer node in the focus history
  83. super + {o,i}
  84. bspc wm -h off; \
  85. bspc node {older,newer} -f; \
  86. bspc wm -h on
  87. # focus or send to the given desktop
  88. super + {_,shift + }{1-9,0}
  89. bspc {desktop -f,node -d} '^{1-9,10}'
  90. #
  91. # preselect
  92. #
  93. # preselect the direction
  94. super + ctrl + {h,j,k,l}
  95. bspc node -p {west,south,north,east}
  96. # preselect the ratio
  97. super + ctrl + {1-9}
  98. bspc node -o 0.{1-9}
  99. # cancel the preselection for the focused node
  100. super + ctrl + space
  101. bspc node -p cancel
  102. # cancel the preselection for the focused desktop
  103. super + ctrl + shift + space
  104. bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
  105. #
  106. # move/resize
  107. #
  108. # expand a window by moving one of its side outward
  109. super + alt + {h,j,k,l}
  110. bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
  111. # contract a window by moving one of its side inward
  112. super + alt + shift + {h,j,k,l}
  113. bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
  114. # move a floating window
  115. super + {Left,Down,Up,Right}
  116. bspc node -v {-20 0,0 20,0 -20,20 0}