oxhak

~/.config/herbstluftwm/autostart

Mar 19th, 2013
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.67 KB | None | 0 0
  1. ~/.config/herbstluftwm/autostart
  2.  
  3. #!/bin/bash
  4.  
  5. # this is a simple config for herbstluftwm
  6. xset -dpms
  7. xset s noblank
  8. xset s off
  9. feh --bg-tile ~/Images/wallpaper.jpg &
  10. killall dzen2 &
  11. #~/.config/herbstluftwm/panel.sh &
  12. function hc() {
  13.     herbstclient "$@"
  14. }
  15.  
  16. hc emit_hook reload
  17.  
  18. xsetroot -solid '#333333'
  19.  
  20.  
  21. # remove all existing keybindings
  22. hc keyunbind --all
  23.  
  24. # keybindings
  25. Mod=Mod1
  26. hc keybind $Mod-Shift-q quit
  27. hc keybind $Mod-Shift-r reload
  28. hc keybind $Mod-Shift-c close
  29. hc keybind $Mod-t spawn urxvt
  30.  
  31. # tags
  32. TAG_NAMES=( {1..9} )
  33. TAG_KEYS=( {1..9} 0 )
  34.  
  35. hc rename default "${TAG_NAMES[0]}" || true
  36. for i in ${!TAG_NAMES[@]} ; do
  37.     hc add "${TAG_NAMES[$i]}"
  38.     key="${TAG_KEYS[$i]}"
  39.     if ! [ -z "$key" ] ; then
  40.         hc keybind "$Mod-$key" use_index "$i"
  41.         hc keybind "$Mod-Shift-$key" move_index "$i"
  42.     fi
  43. done
  44.  
  45. # cycle through tags
  46. hc keybind $Mod-period use_index +1 --skip-visible
  47. hc keybind $Mod-comma  use_index -1 --skip-visible
  48. hc keybind $Mod-Right use_index +1 --skip-visible
  49. hc keybind $Mod-Left  use_index -1 --skip-visible
  50.  
  51. # layouting
  52. hc keybind $Mod-r remove
  53. hc keybind $Mod-space cycle_layout 1
  54. hc keybind $Mod-u split vertical 0.5
  55. hc keybind $Mod-o split horizontal 0.5
  56. hc keybind $Mod-s floating toggle
  57. hc keybind $Mod-f fullscreen toggle
  58. hc keybind $Mod-p pseudotile toggle
  59.  
  60. # resizing
  61. RESIZESTEP=0.05
  62. hc keybind $Mod-Control-h resize left +$RESIZESTEP
  63. hc keybind $Mod-Control-j resize down +$RESIZESTEP
  64. hc keybind $Mod-Control-k resize up +$RESIZESTEP
  65. hc keybind $Mod-Control-l resize right +$RESIZESTEP
  66.  
  67. # mouse
  68. hc mouseunbind --all
  69. hc mousebind $Mod-Button1 move
  70. hc mousebind $Mod-Button2 resize
  71. hc mousebind $Mod-Button3 zoom
  72.  
  73. # focus
  74. hc keybind $Mod-BackSpace   cycle_monitor
  75. hc keybind $Mod-Tab         cycle_all +1
  76. hc keybind $Mod-Shift-Tab   cycle_all -1
  77. hc keybind $Mod-c cycle
  78. hc keybind $Mod-h focus left
  79. hc keybind $Mod-j focus down
  80. hc keybind $Mod-k focus up
  81. hc keybind $Mod-l focus right
  82. hc keybind $Mod-i jumpto urgent
  83. hc keybind $Mod-Shift-h shift left
  84. hc keybind $Mod-Shift-j shift down
  85. hc keybind $Mod-Shift-k shift up
  86. hc keybind $Mod-Shift-l shift right
  87.  
  88. # colors
  89. hc set frame_border_active_color '#333333'
  90. hc set frame_border_normal_color '#333333'
  91. hc set frame_bg_normal_color '#565656'
  92. hc set frame_bg_active_color '#333333'
  93. hc set frame_border_width 5
  94. hc set window_border_width 1
  95. hc set window_border_inner_width 1
  96. hc set window_border_normal_color '#454545'
  97. hc set window_border_active_color '#33CCFF'
  98. hc set always_show_frame 1
  99. hc set frame_gap 4
  100. # add overlapping window borders
  101. hc set window_gap -2
  102. hc set frame_padding 2
  103. hc set smart_window_surroundings 0
  104. hc set smart_frame_surroundings 1
  105. hc set mouse_recenter_gap 0
  106.  
  107.  
  108. # rules
  109. hc unrule -F
  110. #hc rule class=XTerm tag=3 # move all xterms to tag 3
  111. hc rule focus=off # normally do not focus new clients
  112. # give focus to most common terminals
  113. hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
  114. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
  115. hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
  116. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
  117.  
  118. # unlock, just to be sure
  119. hc unlock
  120.  
  121. herbstclient set tree_style '╾│ ├└╼─┐'
  122.  
  123. # do multi monitor setup here, e.g.:
  124. # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
  125. # or simply:
  126. # hc detect_monitors
  127.  
  128. # find the panel
  129. herbstclient pad $(herbstclient list_monitors | cut -d: -f1) 16;
  130. panel=~/.config/herbstluftwm/panel.sh
  131. [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
  132. for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
  133.     # start it on each monitor
  134.     $panel $monitor &
  135. done
Advertisement
Add Comment
Please, Sign In to add comment