#! /bin/zsh ####################################################### ## locate: ${XDG_CONFIG_HOME}/herbstluftwm/autostart ## ## author: Vincent Z (github.com/milomouse) ## ## detail: startup configuration for `herbstluftwm' ## ####################################################### ## NOTE 1: [most] keybindings are handled by `sxhkd' ## ####################################################### function _hc() { ex=(${ex} , ${@}) } ## GLOBAL: #// scheme: Mod=Mod4 TAG_NAMES=( Ⅰ Ⅱ Ⅲ ⅠV V VⅠ VⅡ VⅢ ⅠⅩ Ⅹ ) TAG_BINDS=( {1..10} ) #// reset: herbstclient chain , emit_hook reload , keyunbind --all , mouseunbind --all , unsetenv HCT , set default_frame_layout 2 , load default '(clients max:0)' , rename default "${TAG_NAMES[1]}" #// tags: for ((i=1; i<$((${TAG_BINDS[-1]}+1)); i++)) ; do if [[ $i -gt ${TAG_BINDS[1]} ]] { herbstclient add ${TAG_NAMES[$i]} } herbstclient and , keybind $Mod-${i[-1]} use ${TAG_NAMES[$i]} , keybind $Mod-Shift-${i[-1]} move ${TAG_NAMES[$i]} done #// mouse: _hc mousebind $Mod-Button1 move _hc mousebind $Mod-Button2 zoom _hc mousebind $Mod-Button3 resize ## SETTINGS: #// behavioral: _hc set focus_stealing_prevention 0 _hc set focus_follows_mouse 0 _hc set raise_on_focus 0 _hc set raise_on_click 1 _hc set mouse_recenter_gap 0 #// borders/gaps: _hc set always_show_frame 1 _hc set frame_bg_transparent 0 _hc set frame_border_width 2 _hc set window_border_width 5 _hc set window_border_inner_width 0 _hc set gapless_grid 1 _hc set frame_gap -2 _hc set window_gap -2 _hc set frame_padding 2 _hc set smart_window_surroundings 0 _hc set smart_frame_surroundings 0 #// colors: _hc set frame_border_active_color '#101010' _hc set frame_border_normal_color '#101010' _hc set frame_bg_active_color '#202020' _hc set frame_bg_normal_color '#191919' _hc set window_border_active_color '#343434' _hc set window_border_normal_color '#161616' _hc set window_border_urgent_color '#4cdcd4' #// other: _hc set tree_style '╾│ ├└╼─┐' _hc unlock _hc detect_monitors _hc pad 0 30 0 0 0 # RULES: #// global focus: _hc unrule -F _hc rule focus=on #// move to tag: _hc rule class=Firefox tag=VⅡ _hc rule class=Dwb tag=VⅢ _hc rule class=Gimp tag=ⅠⅩ _hc rule class=Pavucontrol tag=Ⅹ #// management: _hc rule title="Open Image" pseudotile=on _hc rule title="Save As" pseudotile=on _hc rule title="Save file" pseudotile=on _hc rule class=Toplevel pseudotile=on _hc rule instance=gcolor2 pseudotile=on _hc rule class=XFontSel pseudotile=on _hc rule class=tint2 manage=off focus=off _hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on _hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off _hc rule windowtype~'_NET_WM_WINDOW_TYPE_(FULLSCREEN|FS)' fullscreen=on ## RUNTIME: #// external: _hc spawn ${XDG_CONFIG_HOME:-$HOME}/herbstluftwm/dzen-post.zsh _hc emit_hook complete #// execute chain: herbstclient chain ${ex}&