#!/usr/bin/env bash # ██ ██ # ░██ ░██ # ░██ █████ ██████░██ # ░██████ ██░░░██░░██░░█░██████ # ░██░░░██░███████ ░██ ░ ░██░░░██ # ░██ ░██░██░░░░ ░██ ░██ ░██ # ░██ ░██░░██████░███ ░██████ # ░░ ░░ ░░░░░░ ░░░ ░░░░░ # configuration made with love! hc() { herbstclient "$@" } hc emit_hook reload # remove all existing keybindings hc keyunbind --all # keybindings Mod=Mod1 # Use alt as the main modifier # tags tag_names=("TERM" "WEB" "IMG" "NULL" "HERB") tag_keys=( {1..5} 0 ) hc rename default "${tag_names[0]}" || true for i in ${!tag_names[@]} ; do hc add "${tag_names[$i]}" key="${tag_keys[$i]}" if ! [ -z "$key" ] ; then hc keybind "Control-$key" use_index "$i" hc keybind "$Mod-Control-$key" move_index "$i" fi done # The following cycles through the available layouts within a frame, but skips # layouts, if the layout change wouldn't affect the actual window positions. # I.e. if there are two windows within a frame, the grid layout is skipped. hc keybind $Mod-space \ or , and . compare tags.focus.curframe_wcount = 2 \ . cycle_layout +1 vertical horizontal max vertical grid \ , cycle_layout +1 # mouse hc mouseunbind --all hc mousebind $Mod-Button1 move hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button3 resize # theme hc attr theme.tiling.reset 1 hc attr theme.floating.reset 1 hc set frame_border_active_color '#7d3750' hc set frame_border_normal_color '#1d1f21' hc set frame_bg_normal_color '#1d1f21' hc set frame_bg_active_color '#345f0c' hc set frame_border_width 1 hc set always_show_frame 0 hc set frame_bg_transparent 1 hc set frame_transparent_width 0 hc set frame_gap 0 hc attr theme.active.color '#7d3750' hc attr theme.normal.color '#1d1f21' hc attr theme.urgent.color orange hc attr theme.inner_width 1 hc attr theme.inner_color '#1d1f21' hc attr theme.border_width 4 hc attr theme.floating.border_width 6 hc attr theme.floating.outer_width 2 hc attr theme.floating.outer_color '#222222' hc attr theme.active.inner_color '#7d3750' hc attr theme.active.outer_color '#7d3750' hc attr theme.background_color '#1d1f21' hc set window_gap 0 hc set frame_padding 0 hc set smart_window_surroundings 0 hc set smart_frame_surroundings 1 hc set mouse_recenter_gap 0 # layouts hc load TERM ' (split horizontal:0.730000:0 (split horizontal:0.310000:1 (clients vertical:0 0x200001a) (clients vertical:0 0x8000d9)) (split vertical:0.300000:1 (clients vertical:0 0x80001d) (split vertical:0.780000:1 (clients vertical:0) (split horizontal:0.680000:0 (clients vertical:0) (clients vertical:0)))))' # rules hc unrule -F #hc rule class=XTerm tag=3 # move all xterms to tag 3 hc rule focus=on # normally focus new clients #hc rule focus=off # normally do not focus new clients # give focus to most common terminals #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off # unlock, just to be sure hc unlock herbstclient set tree_style '╾│ ├└╼─┐' # do multi monitor setup here, e.g.: # hc set_monitors 1280x1024+0+0 1280x1024+1280+0 # or simply: hc detect_monitors # find the panel panel=~/.config/herbstluftwm/panel_old.sh [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do # start it on each (nope) monitor "$panel" & done