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 3.1KB

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