#!/bin/bash # this is a simple config for herbstluftwm function hc() { herbstclient "$@" } hc emit_hook reload feh --bg-tile ~/pictures/wallpaper-2311191.jpg # remove all existing keybindings hc keyunbind --all # keybindings Mod=Mod4 hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-c close hc keybind $Mod-Return spawn urxvt hc keybind $Mod-t spawn hrunorraise Emacs emacsclient -ca '' hc keybind $Mod-c spawn hrunorraise URxvt urxvtc hc keybind $Mod-w spawn hrunorraise Conkeror conkeror hc keybind Control-Mod1-l spawn i3lock --color 000000 # tags TAG_NAMES=( {1..9} ) TAG_KEYS=( {1..9} 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 "$Mod-$key" use_index "$i" hc keybind "$Mod-Shift-$key" move_index "$i" fi done # cycle through tags hc keybind $Mod-period use_index +1 --skip-visible hc keybind $Mod-comma use_index -1 --skip-visible hc keybind $Mod-Right use_index +1 --skip-visible hc keybind $Mod-Left use_index -1 --skip-visible # layouting hc keybind $Mod-k remove hc keybind $Mod-space cycle_layout 1 hc keybind $Mod-s split vertical 0.5 hc keybind $Mod-Shift-s split horizontal 0.5 hc keybind $Mod-f floating toggle hc keybind $Mod-Shift-f fullscreen toggle hc keybind $Mod-p pseudotile toggle # resizing RESIZESTEP=0.05 hc keybind $Mod-Control-n resize left +$RESIZESTEP hc keybind $Mod-Control-e resize down +$RESIZESTEP hc keybind $Mod-Control-i resize up +$RESIZESTEP hc keybind $Mod-Control-o resize right +$RESIZESTEP # mouse hc mouseunbind --all hc mousebind $Mod-Button1 move hc mousebind $Mod-Button2 resize hc mousebind $Mod-Button3 zoom # focus hc keybind $Mod-BackSpace cycle_monitor hc keybind $Mod-Tab cycle_all +1 hc keybind $Mod-Shift-Tab cycle_all -1 # hc keybind $Mod-c cycle hc keybind $Mod-n focus left hc keybind $Mod-e focus down hc keybind $Mod-i focus up hc keybind $Mod-o focus right hc keybind $Mod-u jumpto urgent hc keybind $Mod-Shift-n shift left hc keybind $Mod-Shift-e shift down hc keybind $Mod-Shift-i shift up hc keybind $Mod-Shift-o shift right # colors hc set frame_border_active_color '#222222' hc set frame_border_normal_color '#101010' hc set frame_bg_normal_color '#111111' hc set frame_bg_active_color '#263f1f' hc set frame_border_width 1 hc set window_border_width 3 hc set window_border_inner_width 1 hc set window_border_normal_color '#454545' hc set window_border_active_color '#54a875' hc set always_show_frame 1 hc set frame_gap 15 # add overlapping window borders hc set window_gap -2 hc set frame_padding 2 hc set smart_window_surroundings 0 hc set smart_frame_surroundings 0 hc set mouse_recenter_gap 0 hc set switch_monitors_to_get_tag 0 ## Make sure the windows update immediately when being resized in ## floating mode. hc set update_dragged_clients 1 # rules hc unrule -F hc rule focus=on # normally do focus new clients hc rule class=URxvt focus=on tag=1 index=1 switchtag=on hc rule class=Emacs tag=1 index=0 hc rule class=Conkeror tag=2 index=0 hc rule class=Pinentry pseudotile=on hc rule class=Firefox focus=off hc rule instance=firefox-developer focus=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off # unlock, just to be sure hc unlock herbstclient set tree_style '╾│ ├└╼─┐' hc lock # do multi monitor setup hc set_monitors \ 1920x1080+0+0 \ 1920x1080+1920+0 # Pad the first monitor 16 pixels on the bottom. hc pad 0 0 0 31 hc load 1 '(split horizontal:0.610000:1 (clients max:0) (clients vertical:0))' hc load 2 '(clients max:0)' hc focus_edge left hc unlock