NixOS configs
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.

145 lines
2.9 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. #
  2. # wm independent hotkeys
  3. #
  4. # terminal emulator
  5. super + Return
  6. kitty
  7. # browser
  8. super + shift + w
  9. brave
  10. # program launcher
  11. super + {p,space}
  12. dmenu_run -fn "Fira Code:size=14"
  13. # make sxhkd reload its configuration files:
  14. super + Escape
  15. pkill -USR1 -x sxhkd
  16. #
  17. # bspwm hotkeys
  18. #
  19. # quit/restart bspwm
  20. super + shift + r
  21. bspc wm -r
  22. super + shift + p
  23. ~/.config/polybar/launch.sh
  24. super + shift + e
  25. QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill $MANAGER?")
  26. if test "$QUIT" == "Yes" ; then
  27. pkill bspwm
  28. fi
  29. # close and kill
  30. super + shift + q
  31. bspc node -c
  32. # alternate between the tiled and monocle layout
  33. super + m
  34. bspc desktop -l next
  35. # send the newest marked node to the newest preselected node
  36. super + y
  37. bspc node newest.marked.local -n newest.!automatic.local
  38. # swap the current node and the biggest window
  39. super + g
  40. bspc node -s biggest.window
  41. #
  42. # state/flags
  43. #
  44. # set the window state
  45. super + {t,shift + t,s,f}
  46. bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
  47. # set the node flags
  48. super + ctrl + {m,x,y,z}
  49. bspc node -g {marked,locked,sticky,private}
  50. #
  51. # focus/swap
  52. #
  53. # focus the node in the given direction
  54. super + {_,shift + }{h,j,k,l}
  55. bspc node -{f,s} {west,south,north,east}
  56. # focus the node for the given path jump
  57. #super + {p,b,comma,period}
  58. # bspc node -f @{parent,brother,first,second}
  59. # focus the next/previous window in the current desktop
  60. super + {_,shift + }c
  61. bspc node -f {next,prev}.local.!hidden.window
  62. # focus the next/previous desktop in the current monitor
  63. super + bracket{left,right}
  64. bspc desktop -f {prev,next}.local
  65. # focus the last node/desktop
  66. super + {grave,Tab}
  67. bspc {node,desktop} -f last
  68. # focus the older or newer node in the focus history
  69. super + {o,i}
  70. bspc wm -h off; \
  71. bspc node {older,newer} -f; \
  72. bspc wm -h on
  73. # focus or send to the given desktop
  74. super + {_,shift + }{1-9,0}
  75. bspc {desktop -f,node -d} '^{1-9,10}'
  76. #
  77. # preselect
  78. #
  79. # preselect the direction
  80. super + ctrl + {h,j,k,l}
  81. bspc node -p {west,south,north,east}
  82. # preselect the ratio
  83. super + ctrl + {1-9}
  84. bspc node -o 0.{1-9}
  85. # cancel the preselection for the focused node
  86. super + ctrl + space
  87. bspc node -p cancel
  88. # cancel the preselection for the focused desktop
  89. super + ctrl + shift + space
  90. bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
  91. #
  92. # move/resize
  93. #
  94. # expand a window by moving one of its side outward
  95. super + alt + {h,j,k,l}
  96. bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
  97. # contract a window by moving one of its side inward
  98. super + alt + shift + {h,j,k,l}
  99. bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
  100. # move a floating window
  101. super + {Left,Down,Up,Right}
  102. bspc node -v {-20 0,0 20,0 -20,20 0}
  103. # old alt keybindings
  104. #
  105. alt + {Up,Down}
  106. pactl set-sink-volume 0 {+5%,-5%}
  107. # screenshot capability
  108. super + shift + s
  109. mkdir -p ~/screenshots
  110. scrot ~/screenshots/%Y-%m-%d-%T-screenshot.png