Created
August 26, 2013 08:03
-
-
Save Olivia5k/6339050 to your computer and use it in GitHub Desktop.
My luftwaffe conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this is a simple config for herbstluftwm | |
function hc() { | |
herbstclient "$@" | |
} | |
hc emit_hook reload | |
xsetroot -solid '#5A8E3A' | |
# 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-Return spawn mor main | |
hc keybind $Mod-Mod1-Return spawn urxvt | |
# tags | |
TAG_NAMES=( {1..2} ) | |
TAG_KEYS=( {1..2} ) | |
hc rename default "${TAG_NAMES[0]}" || true | |
for i in ${!TAG_NAMES[@]} ; do | |
hc add "${TAG_NAMES[$i]}" | |
done | |
for x in {1..10} ; do | |
hc keybind $Mod-$x spawn xbacklight -set ${x}0 | |
hc keybind $Mod-Mod1-$x spawn amixer set PCM ${x}0% | |
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-r close_or_remove | |
hc keybind $Mod-b cycle_layout 1 | |
hc keybind $Mod-u split vertical 0.5 | |
hc keybind $Mod-o split horizontal 0.5 | |
hc keybind $Mod-s floating toggle | |
hc keybind $Mod-f fullscreen toggle | |
hc keybind $Mod-p 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 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 Mod1-Tab cycle +1 | |
hc keybind Mod1-Shift-Tab cycle -1 | |
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-t jumpto urgent | |
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 | |
# lockdown | |
hc keybind $Mod-BackSpace spawn xlock | |
# screen manipulation | |
hc keybind $Mod-Mod1-BackSpace spawn sswitch | |
hc keybind $Mod-aring spawn sswitch | |
hc keybind $Mod-adiaeresis spawn sswitch VGA1 | |
hc keybind $Mod-[ spawn sswitch | |
hc keybind $Mod-\' spawn sswitch VGA1 | |
hc keybind $Mod-Mod1-p spawn ss | |
# dmenu hax | |
hc keybind $Mod-Control-space spawn dmenu_exec -z | |
hc keybind $Mod-space spawn dmenu_www | |
# dzentinel hax | |
hc keybind $Mod+g spawn dzentinel | |
hc keybind $Mod+Mod1+g spawn pkill dzentinel | |
# run-or-raisers | |
hc keybind $Mod+a spawn mor alt | |
hc keybind $Mod+d spawn mor dev | |
hc keybind $Mod+e spawn mor dc ninjaloot | |
hc keybind $Mod+i spawn mor irc ninjaloot | |
hc keybind $Mod+m spawn mor mail | |
hc keybind $Mod+n spawn mor main ninjaloot | |
hc keybind $Mod+q spawn ror "luakit" '("luakit" "luakit")' "luakit" | |
# volume | |
hc keybind $Mod+z spawn amixer set Master toggle | |
hc keybind $Mod+Mod1+h spawn amixer set PCM 10- | |
hc keybind $Mod+Mod1+l spawn amixer set PCM 10+ | |
# mpd | |
hc keybind $Mod+Mod1+a spawn mpc -q prev | |
hc keybind $Mod+Mod1+s spawn mpc -q toggle | |
hc keybind $Mod+Mod1+d spawn mpc -q next | |
# colors | |
hc set frame_bg_transparent 1 | |
hc set frame_border_active_color '#222222' | |
hc set frame_border_normal_color '#101010' | |
hc set frame_border_width 2 | |
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 '#6c8ca7' | |
hc set window_border_urgent_color '#9f2200' | |
hc set always_show_frame 1 | |
hc set frame_gap 4 | |
# 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 1 | |
hc set mouse_recenter_gap 0 | |
# rules | |
hc unrule -F | |
hc rule focus=off | |
hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on | |
hc rule class~'(luakit)' 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 | |
# unlock, just to be sure | |
hc unlock | |
herbstclient set tree_style '╾│ ├└╼─┐' | |
hc pad 0 16 | |
pkill dzentinel &> /dev/null | |
dzentinel | |
# if [[ $(hc layout | wc -l) -eq 1 ]]; then | |
# # Seems to be the initial start. Go do the layout. | |
# hc split h 0.65 | |
# hc focus right | |
# hc split v 0.65 | |
# hc focus down | |
# hc spawn mux irc ninjaloot | |
# hc focus up | |
# hc spawn mux alt | |
# hc spawn mux main | |
# hc focus left | |
# hc spawn mux mail | |
# hc spawn mux dev | |
# hc spawn luakit | |
# fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment