#!/bin/bash # this is a simple config for herbstluftwm function hc() { herbstclient "$@" } hc emit_hook reload # remove all existing keybindings hc keyunbind --all # modules ## colors hfsdir="$HOME/.config/herbstluftwm/scripts" source "$hfsdir/colors"; # keybindings Mod=Mod4 hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r reload hc keybind $Mod-c close ## apps hc keybind $Mod-Return spawn urxvtc hc keybind $Mod-w spawn luakit hc keybind $Mod-m spawn urxvtc -e mutt hc keybind $Mod-n spawn urxvtc -e newsbeuter -r hc keybind $Mod-p spawn urxvtc -e ncmpcpp hc keybind $Mod-f spawn urxvtc -e ranger hc keybind $Mod-e spawn urxvtc -e vim hc keybind $Mod-space spawn dmenu_run -i -nb "${color['black']}" \ -nf "${color['white']}" -sb "${color['blue']}" \ -sf "${color['black']}" hc keybind $Mod-F3 spawn $hfsdir/volume.sh Master 5%- hc keybind $Mod-F4 spawn $hfsdir/volume.sh Master 5%+ hc keybind $Mod-F2 spawn $hfsdir/volume.sh Master toggle hc keybind $Mod-Shift-w spawn urxvtc -e wicd-curses # 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 spawn $hfsdir/nexttag.sh hc keybind $Mod-comma spawn $hfsdir/prevtag.sh hc keybind $Mod-Right use_index +1 hc keybind $Mod-Left use_index -1 # layouting hc keybind $Mod-d remove hc keybind $Mod-semicolon cycle_layout 1 hc keybind $Mod-u split vertical 0.5 hc keybind $Mod-o split horizontal 0.5 hc keybind $Mod-backslash floating toggle hc keybind $Mod-equal fullscreen toggle hc keybind $Mod-minus pseudotile toggle # resizing RESIZESTEP=0.05 hc keybind $Mod-Control-h resize left +$RESIZESTEP hc keybind $Mod-Control-j resize down +$RESIZESTEP hc keybind $Mod-Control-k resize up +$RESIZESTEP hc keybind $Mod-Control-l resize right +$RESIZESTEP # mouse hc mousebind $Mod-Button1 move hc mousebind $Mod-Button3 resize hc mousebind $Mod-Button2 zoom # focus hc keybind $Mod-BackSpace cycle_monitor hc keybind $Mod-Tab cycle +1 hc keybind $Mod-Shift-Tab cycle -1 hc keybind $Mod-Control-Tab cycle_all +1 hc keybind $Mod-Control-Shift-Tab cycle_all -1 #hc keybind $Mod-Shift-c cycle hc keybind $Mod-h focus left hc keybind $Mod-j focus down hc keybind $Mod-k focus up hc keybind $Mod-l focus right hc keybind $Mod-Shift-h shift left hc keybind $Mod-Shift-j shift down hc keybind $Mod-Shift-k shift up hc keybind $Mod-Shift-l shift right # crazy stuff ! ## open a horizontal split & move active window into it hc keybind $Mod-Shift-o spawn $hfsdir/opensplit.sh h 0.5 hc keybind $Mod-Shift-u spawn $hfsdir/opensplit.sh v 0.5 # settings hc set tree_style "╾ ╼" hc set frame_bg_transparent 1 hc set default_frame_layout 2 ## colors hc set frame_border_active_color ${color["magenta"]} hc set frame_border_normal_color ${color["black"]} hc set frame_bg_normal_color ${color["black"]} hc set frame_bg_active_color ${color["gray"]} hc set frame_border_width 1 hc set window_border_width 1 hc set window_border_normal_color ${color["black"]} hc set window_border_active_color ${color["blue"]} hc set always_show_frame 1 hc set window_gap 4 # panel (sleep 1s && hc spawn $hfsdir/panel.sh) # rules hc unrule -F #hc rule class=XTerm tag=3 # move all xterms to tag 3 hc rule focus=on # normally *DO* 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)' manage=off hc rule class='Gvim' pseudotile=on hc rule class='feh' pseudotile=on hc rule class='Gcolor2' pseudotile=on hc rule class='Agave' pseudotile=on ## GIMP # use tag 9 hc load 9 ' (split horizontal:0.850000:0 (split horizontal:0.200000:1 (clients vertical:0) (clients max:0)) (clients vertical:0)) ' #load predefined layout # center all other gimp windows on tag 9 hc rule class=Gimp tag=9 index=01 pseudotile=on hc rule class=Gimp windowrole~'gimp-(image-window|toolbox|dock)' \ pseudotile=off hc rule class=Gimp windowrole=gimp-toolbox focus=off index=00 hc rule class=Gimp windowrole=gimp-dock focus=off index=1