Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.20 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # this is a simple config for herbstluftwm
  4.  
  5. hc() {
  6.     herbstclient "$@"
  7. }
  8.  
  9. hc emit_hook reload
  10.  
  11. xsetroot -solid '#101010'
  12. feh ~/Pictures/wallhaven/wallhaven-473815.jpg --bg-fill
  13. #/usr/bin/compton --config /home/user/.config/herbstluftwm/compton.conf
  14.  
  15. #nitrogen --restore &
  16. #stalonetray &
  17.  
  18. # remove all existing keybindings
  19. hc keyunbind --all
  20.  
  21. # keybindings
  22. # if you have a super key you will be much happier with Mod set to Mod4
  23. #Mod=Mod1    # Use alt as the main modifier
  24. Mod=Mod4   # Use the super key as the main modifier
  25.  
  26. hc keybind $Mod-Shift-q quit
  27. hc keybind $Mod-Shift-r reload
  28. hc keybind $Mod-q close
  29. ##hc keybind $Mod-Return spawn ${TERMINAL:-xtrem} # use your $TERMINAL with xterm as fallback
  30. hc keybind $Mod-Return spawn urxvt # use your $TERMINAL with xterm as fallback
  31. hc keybind $Mod-d spawn dmenu_run -nb "#2C2C2C" -sb "#FF0000" -l 100
  32. hc keybind $Mod-m spawn lxappearance
  33. hc keybind $Mod-Shift-m spawn gksudo lxappearance
  34. #hc keybind $Mod-b spawn google-chrome
  35. hc keybind $Mod-b spawn iceweasel
  36. hc keybind $Mod-Shift-t spawn icedove
  37. hc keybind $Mod-Shift-s spawn gksudo synaptic
  38.  
  39. hc keybind $Mod-Control-r spawn dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
  40. hc keybind $Mod-Control-s spawn dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
  41.  
  42.  
  43. hc keybind $Mod-o spawn mpc toggle
  44. #hc keybind $Mod-o spawn mpc next
  45. #hc keybind $Mod-Shift-o spawn mpc prev
  46. hc keybind $Mod-bracketright spawn mpc next
  47. hc keybind $Mod-bracketleft spawn mpc prev
  48. #########hc keybind $Mod-Shift-bracketright spawn htop
  49.  
  50. ###hc keybind XF86ScreenSaver spawn xscreensaver-command -lock
  51. ###hc keybind XF86Display spawn ~/bin/rescreen
  52. ###hc keybind XF86MonBrightnessDown spawn xbacklight -dec 5
  53. ###hc keybind XF86MonBrightnessUp spawn xbacklight -inc 5
  54. ###hc keybind XF86AudioRaiseVolume spawn amixer -q set Master 5%+ unmute
  55. ###hc keybind XF86AudioLowerVolume spawn amixer -q set Master 5%- unmute
  56. ###hc keybind XF86AudioMute spawn amixer -q set Master toggle
  57. ###hc keybind XF86Launch1 spawn nemo
  58.  
  59. ###hc keybind XF86AudioLowerVolume spawn amixer -q set Master 2%-
  60. ###hc keybind XF86AudioRaiseVolume spawn amixer -q set Master 2%+
  61. ###hc keybind XF86AudioMute spawn amixer -D pulse set Master toggle
  62.  
  63. # basic movement
  64. # focusing clients
  65. hc keybind $Mod-Left  focus left
  66. hc keybind $Mod-Down  focus down
  67. hc keybind $Mod-Up    focus up
  68. hc keybind $Mod-Right focus right
  69. hc keybind $Mod-h     focus left
  70. hc keybind $Mod-j     focus down
  71. hc keybind $Mod-k     focus up
  72. hc keybind $Mod-l     focus right
  73.  
  74. # moving clients
  75. hc keybind $Mod-Shift-Left  shift left
  76. hc keybind $Mod-Shift-Down  shift down
  77. hc keybind $Mod-Shift-Up    shift up
  78. hc keybind $Mod-Shift-Right shift right
  79. hc keybind $Mod-Shift-h     shift left
  80. hc keybind $Mod-Shift-j     shift down
  81. hc keybind $Mod-Shift-k     shift up
  82. hc keybind $Mod-Shift-l     shift right
  83.  
  84. # splitting frames
  85. # create an empty frame at the specified direction
  86. ##hc keybind $Mod-u       split   bottom  0.5
  87. ##hc keybind $Mod-o       split   right   0.5
  88. hc keybind $Mod-Alt-u       split   bottom  0.5
  89. hc keybind $Mod-Alt-o       split   right   0.5
  90. # let the current frame explode into subframes
  91. ##hc keybind $Mod-Control-space split explode
  92. hc keybind $Mod-Alt-space split explode
  93.  
  94. # resizing frames
  95. resizestep=0.05
  96. hc keybind $Mod-Control-h       resize left +$resizestep
  97. hc keybind $Mod-Control-j       resize down +$resizestep
  98. hc keybind $Mod-Control-k       resize up +$resizestep
  99. hc keybind $Mod-Control-l       resize right +$resizestep
  100. hc keybind $Mod-Control-Left    resize left +$resizestep
  101. hc keybind $Mod-Control-Down    resize down +$resizestep
  102. hc keybind $Mod-Control-Up      resize up +$resizestep
  103. hc keybind $Mod-Control-Right   resize right +$resizestep
  104.  
  105. # tags
  106. #tag_names=( {1..9} )
  107. #tag_keys=( {1..9} 0 )
  108.  
  109. #tag_names=( "Web" "Edt" "Trm" "Fmn" "Mil" "Syn" "Smp" )
  110. #tag_names=( "  " "  " "  " "  " "   " "   " "  " "   " "  " )
  111. #tag_names=( "  " "  " "  " "  " "  " "  " "  " )
  112. tag_names=( "" "" "" "" "" "" "" )
  113.  
  114. tag_keys=( {1..7} 0 )
  115.  
  116. hc rename default "${tag_names[0]}" || true
  117. for i in ${!tag_names[@]} ; do
  118.     hc add "${tag_names[$i]}"
  119.     key="${tag_keys[$i]}"
  120.     if ! [ -z "$key" ] ; then
  121.         hc keybind "$Mod-$key" use_index "$i"
  122.         hc keybind "$Mod-Shift-$key" move_index "$i"
  123.     fi
  124. done
  125.  
  126. # cycle through tags
  127. hc keybind $Mod-period use_index +1 --skip-visible
  128. hc keybind $Mod-comma  use_index -1 --skip-visible
  129.  
  130. # layouting
  131. ##hc keybind $Mod-Alt-r remove
  132. hc keybind $Mod-Alt-q remove
  133. hc keybind $Mod-Alt-s floating toggle
  134. hc keybind $Mod-Alt-f fullscreen toggle
  135. hc keybind $Mod-Alt-p pseudotile toggle
  136. # The following cycles through the available layouts within a frame, but skips
  137. # layouts, if the layout change wouldn't affect the actual window positions.
  138. # I.e. if there are two windows within a frame, the grid layout is skipped.
  139. hc keybind $Mod-space                                                           \
  140.             or , and . compare tags.focus.curframe_wcount = 2                   \
  141.                      . cycle_layout +1 vertical horizontal max vertical grid    \
  142.                , cycle_layout +1
  143.  
  144. # mouse
  145. hc mouseunbind --all
  146. hc mousebind $Mod-Button1 move
  147. hc mousebind $Mod-Button2 zoom
  148. hc mousebind $Mod-Button3 resize
  149.  
  150. # focus
  151. hc keybind $Mod-BackSpace   cycle_monitor
  152. hc keybind $Mod-Tab         cycle_all +1
  153. hc keybind $Mod-Shift-Tab   cycle_all -1
  154. hc keybind $Mod-c cycle
  155. hc keybind $Mod-i jumpto urgent
  156.  
  157. #raise on focus
  158. hc set raise_on_focus 0
  159. hc set raise_on_click 0
  160. hc set focus_follows_mouse 1
  161.  
  162. # Misc
  163. hc keybind Print spawn screenshot
  164.  
  165. # theme
  166. hc attr theme.tiling.reset 1
  167. hc attr theme.floating.reset 1
  168. hc set frame_border_active_color '#2C2C2C'
  169. hc set frame_border_normal_color '#2C2C2C'
  170. hc set frame_bg_normal_color '#2C2C2C'  # цвет неактивного фрейма #565656
  171. hc set frame_bg_active_color '#636363'  # цвет активного фрейма #973414
  172. hc set frame_border_width 0         # все фреймы внешняя граница
  173. hc set always_show_frame 0
  174. hc set frame_bg_transparent 1
  175. hc set frame_transparent_width 1        # неактивный фрейм
  176. hc set frame_gap 4
  177.  
  178. hc attr theme.active.color '#636363'
  179. hc attr theme.normal.color '#2C2C2C'
  180. hc attr theme.urgent.color orange
  181. hc attr theme.inner_width 0
  182. hc attr theme.inner_color black
  183. hc attr theme.border_width 2            # активный фрейм
  184. hc attr theme.floating.border_width 1
  185. hc attr theme.floating.outer_width 0
  186. hc attr theme.floating.outer_color black
  187. hc attr theme.active.inner_color '#3E4A00'
  188. hc attr theme.active.outer_color '#3E4A00'
  189. hc attr theme.background_color '#2C2C2C'
  190.  
  191. hc set window_gap 0
  192. hc set frame_padding 0
  193. hc set smart_window_surroundings 0
  194. hc set smart_frame_surroundings 1
  195. hc set mouse_recenter_gap 0
  196.  
  197. # rules
  198. hc unrule -F
  199. #hc rule class=Google-chrome tag=""
  200. hc rule class=Firefox-esr tag=""
  201. hc rule class=URxvt tag=""
  202. hc rule class=Icedove tag=""
  203. hc rule class=Synaptic tag=""
  204. hc rule focus=on # normally focus new clients
  205. #hc rule focus=off # normally do not focus new clients
  206. # give focus to most common terminals
  207. #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
  208. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
  209. hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
  210. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
  211.  
  212. hc rule class~"Lxappearance" pseudotile=on
  213.  
  214. # unlock, just to be sure
  215. hc unlock
  216.  
  217. herbstclient set tree_style '╾│ ├└╼─┐'
  218.  
  219. # do multi monitor setup here, e.g.:
  220. # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
  221. # or simply:
  222. # hc detect_monitors
  223.  
  224. # find the panel
  225. panel=~/.config/herbstluftwm/panel.sh
  226. #panel=~/.config/herbstluftwm/panel/panel
  227. [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
  228. for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
  229.     # start it on each monitor
  230.     "$panel" $monitor &
  231. done
  232.  
  233. sh ~/.config/herbstluftwm/tray.sh &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement