cleanup herbstluft config a bit

This commit is contained in:
Felix Van der Jeugt 2014-12-29 23:22:32 +01:00
parent 0b016ac582
commit f9dead1959

View File

@ -20,11 +20,19 @@ hc keyunbind --all
#Mod=Mod1 # Use alt as the main modifier #Mod=Mod1 # Use alt as the main modifier
Mod=Mod4 # Use the super key as the main modifier Mod=Mod4 # Use the super key as the main modifier
# herbstluft control
hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close hc keybind $Mod-Shift-c close
# application spawning
hc keybind $Mod-Return spawn urxvtc hc keybind $Mod-Return spawn urxvtc
hc keybind $Mod-Shift-s spawn systemctl suspend hc keybind $Mod-Shift-s spawn systemctl suspend
hc keybind $Mod-e spawn dmenu_run -z
hc keybind Scroll_Lock spawn dmenu_run -z
hc keybind $Mod-b spawn urxvtc -name ranger -e ranger
hc keybind $Mod-Control-c spawn urxvtc -name weechat -e weechat
hc keybind $Mod-Control-n spawn urxvtc -name newsbeuter -e newsbeuter
hc keybind XF86AudioMute spawn sound_control.sh toggle hc keybind XF86AudioMute spawn sound_control.sh toggle
hc keybind XF86AudioRaiseVolume spawn sound_control.sh up hc keybind XF86AudioRaiseVolume spawn sound_control.sh up
hc keybind XF86AudioLowerVolume spawn sound_control.sh down hc keybind XF86AudioLowerVolume spawn sound_control.sh down
@ -36,7 +44,6 @@ hc keybind XF86AudioLowerVolume spawn sound_control.sh down
#hc keybind XF86MonBrightnessDown #hc keybind XF86MonBrightnessDown
#hc keybind XF86MonBrightnessDown #hc keybind XF86MonBrightnessDown
# basic movement # basic movement
# focusing clients # focusing clients
hc keybind $Mod-Left focus left hc keybind $Mod-Left focus left
@ -77,16 +84,17 @@ hc keybind $Mod-Control-Up resize up +$resizestep
hc keybind $Mod-Control-Right resize right +$resizestep hc keybind $Mod-Control-Right resize right +$resizestep
# tags # tags
tag_names=( {1..9} ) tag_names=( {1..9} mail news chat )
tag_keys=( {1..9} 0 ) tag_keys=( {1..9} m n c 0 )
hc rename default "${tag_names[0]}" || true hc rename default "${tag_names[0]}" || true
for i in ${!tag_names[@]} ; do for i in ${!tag_names[@]} ; do
hc add "${tag_names[$i]}" name="${tag_names[$i]}"
key="${tag_keys[$i]}" key="${tag_keys[$i]}"
hc add "$name"
if ! [ -z "$key" ] ; then if ! [ -z "$key" ] ; then
hc keybind "$Mod-$key" use_index "$i" hc keybind "$Mod-$key" use "$name"
hc keybind "$Mod-Shift-$key" move_index "$i" hc keybind "$Mod-Shift-$key" move "$name"
hc set_layout max hc set_layout max
fi fi
done done
@ -106,15 +114,10 @@ hc keybind $Mod-p pseudotile toggle
hc keybind $Mod-BackSpace cycle_monitor hc keybind $Mod-BackSpace cycle_monitor
hc keybind $Mod-Tab cycle_all +1 hc keybind $Mod-Tab cycle_all +1
hc keybind $Mod-Shift-Tab cycle_all -1 hc keybind $Mod-Shift-Tab cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-i jumpto urgent hc keybind $Mod-i jumpto urgent
# }}} keybindings # }}} keybindings
# programs {{{
hc keybind $Mod-e spawn dmenu_run -z
# }}} programs
# mouse bindings {{{ # mouse bindings {{{
hc mouseunbind --all hc mouseunbind --all
hc mousebind $Mod-Button1 move hc mousebind $Mod-Button1 move
@ -187,32 +190,23 @@ hc rule class=Gimp windowrole=gimp-toolbox focus=off index=00
hc rule class=Gimp windowrole=gimp-dock focus=off index=1 hc rule class=Gimp windowrole=gimp-dock focus=off index=1
# }}} Gimp # }}} Gimp
# zenity {{{ # Additional Pseudotilers {{{
hc rule class=zenity pseudotile=on hc rule class="zenity" pseudotile=on
hc rule class="mpv" pseudotile=on
hc rule instance="pinentry-gtk-2" pseudotile=on
# }}} # }}}
# mpv {{{ # Application tags {{{
hc rule class="mpv" pseudotile=on
# }}} mpv
# Thunderbird {{{
hc add mail
hc rule instance="Mail" tag=mail hc rule instance="Mail" tag=mail
# [ -n "$(pgrep thunderbird)" ] || thunderbird hc rule title="weechat" tag=chat
hc keybind $Mod-m use mail hc rule title="newsbeuter" tag=news
# }}} Thunderbird # }}}
# Weechat {{{ # Weechat {{{
hc add chat
hc rule title="weechat" tag=chat
# [ -n "$(pgrep weechat)" ] || urxvtc -name weechat -e weechat
hc keybind $Mod-Shift-w spawn urxvtc -name weechat -e weechat
hc keybind $Mod-w use chat
# }}} Weechat # }}} Weechat
# ranger {{{ # newsbeuter {{{
hc keybind $Mod-b spawn urxvtc -name ranger -e ranger # }}} newsbeuter
# }}} ranger
# }}} Application Specific # }}} Application Specific
@ -227,7 +221,7 @@ herbstclient set tree_style '╾│ ├└╼─┐'
# or simply: # or simply:
xrandr --output LVDS1 --auto xrandr --output LVDS1 --auto
if grep -q "HDMI1 connected" <(xrandr); then if grep -q "HDMI1 connected" <(xrandr); then
xrandr --output HDMI1 --auto --right-of LVDS1 xrandr --output HDMI1 --auto --${ORIENTATION:-right}-of LVDS1
fi fi
hc detect_monitors hc detect_monitors
# }}} monitors # }}} monitors