From The Compiler, 5 Years ago, written in Bash.
Embed
  1. #!/bin/bash
  2. # this is a simple config for herbstluftwm
  3.  
  4. function hc() {
  5.     herbstclient "$@"
  6. }
  7.  
  8. #xsetroot -solid '#222222'
  9. feh --bg-scale /home/florian/.config/herbstluftwm/wallpaper.jpg
  10.  
  11.  
  12. # keybindings
  13. Mod=Mod4
  14. hc keybind $Mod-q quit
  15. hc keybind $Mod-Shift-r reload
  16. hc keybind $Mod-Shift-c close
  17. hc keybind $Mod-Return spawn urxvt
  18. hc keybind $Mod-d spawn dmenu-launch
  19.  
  20. # tags
  21. TAG_NAMES=( {1..9} )
  22. TAG_KEYS=( {1..9} 0 )
  23.  
  24. hc set default_frame_layout 3
  25.  
  26. hc rename default "${TAG_NAMES[0]}" || true
  27. for i in ${!TAG_NAMES[@]} ; do
  28.     hc add "${TAG_NAMES[$i]}"
  29.     key="${TAG_KEYS[$i]}"
  30.     if ! [ -z "$key" ] ; then
  31.         hc keybind "$Mod-$key" use "${TAG_NAMES[$i]}"
  32.         hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"
  33.     fi
  34. done
  35.  
  36. # layouting
  37. hc keybind $Mod-r remove
  38. hc keybind $Mod-space cycle_layout 1
  39. hc keybind $Mod-u split vertical 0.5
  40. hc keybind $Mod-o split horizontal 0.5
  41. hc keybind $Mod-s floating toggle
  42. hc keybind $Mod-f fullscreen toggle
  43. hc keybind $Mod-p pseudotile toggle
  44.  
  45. # resizing
  46. RESIZESTEP=0.05
  47. hc keybind $Mod-Control-h resize left +$RESIZESTEP
  48. hc keybind $Mod-Control-j resize down +$RESIZESTEP
  49. hc keybind $Mod-Control-k resize up +$RESIZESTEP
  50. hc keybind $Mod-Control-l resize right +$RESIZESTEP
  51.  
  52. # mouse
  53. hc mousebind $Mod-Button1 move
  54. hc mousebind $Mod-Button2 resize
  55. hc mousebind $Mod-Button3 zoom
  56.  
  57. # focus
  58. hc keybind $Mod-t raise
  59. hc keybind $Mod-BackSpace   cycle_monitor
  60. hc keybind $Mod-Tab         cycle_all +1
  61. hc keybind $Mod-Shift-Tab   cycle_all -1
  62. hc keybind $Mod-c cycle
  63. hc keybind $Mod-h focus left
  64. hc keybind $Mod-j focus down
  65. hc keybind $Mod-k focus up
  66. hc keybind $Mod-l focus right
  67. hc keybind $Mod-Shift-h shift left
  68. hc keybind $Mod-Shift-j shift down
  69. hc keybind $Mod-Shift-k shift up
  70. hc keybind $Mod-Shift-l shift right
  71. hc set focus_follows_mouse 1
  72. hc set raise_on_focus 0
  73. hc set raise_on_click 1
  74.  
  75. # Volume keys
  76. hc keybind XF86AudioLowerVolume spawn /home/florian/bin/volume/vol.sh decrease
  77. hc keybind XF86AudioRaiseVolume spawn /home/florian/bin/volume/vol.sh increase
  78. hc keybind XF86AudioMute spawn /home/florian/bin/volume/vol.sh mute
  79. hc keybind XF86RotateWindows spawn /home/florian/bin/xrotate cw
  80. hc keybind Shift-XF86Back spawn /home/florian/bin/tagswitch prev
  81. hc keybind Shift-XF86Forward spawn /home/florian/bin/tagswitch next
  82. hc keybind XF86Back spawn /home/florian/bin/tagswitch -1
  83. hc keybind XF86Forward spawn /home/florian/bin/tagswitch +1
  84. hc keybind XF86ScreenSaver spawn bash -c 'xset dpms force off; xscreensaver-command -lock'
  85. hc keybind XF86Launch1 spawn urxvt
  86.  
  87. # colors
  88. hc set frame_border_active_color '#49351D'
  89. hc set frame_border_active_color '#0088cc'
  90. hc set frame_border_normal_color '#001155'
  91. hc set frame_bg_normal_color '#BD9768'
  92. hc set frame_bg_normal_color '#222222'
  93. hc set frame_bg_active_color '#BD8541'
  94. hc set frame_bg_active_color '#00aaee'
  95. hc set frame_bg_transparent 1
  96. hc set frame_border_width 2
  97. hc set window_border_width 2
  98. hc set window_border_normal_color '#003377'
  99. hc set window_border_normal_color '#AE8451'
  100. hc set window_border_active_color '#F6FF00'
  101. hc set window_border_active_color '#00bbff'
  102.  
  103. # rules
  104. hc unrule -F
  105. #hc rule class=XTerm tag=3 # move all xterms to tag 3
  106. hc rule focus=on # normally do not focus new clients
  107. # give focus to most common terminals
  108. hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
  109. hc rule class=Cellwriter manage=off
  110. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
  111. hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
  112. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
  113. hc rule instance=xv class=MPlayer fullscreen=on
  114.  
  115. hc load 1 '(clients grid :0)'
  116.  
  117. # autorun
  118. hc spawn /home/florian/scripts/autorun.sh
  119.