#!/usr/bin/env bash # this is a simple config for herbstluftwm hc() { herbstclient "$@" } hc emit_hook reload # remove all existing keybindings hc keyunbind --all # keybindings # if you have a super key you will be much happier with Mod set to Mod4 Mod=Mod1 # Use alt as the main modifier #Mod=Mod4 # Use the super key as the main modifier #hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-q spawn exitbox hc keybind $Mod-Control-r reload hc keybind $Mod-Shift-w close hc keybind $Mod-Return spawn ${TERMINAL:-xterm} # use your $TERMINAL with xterm as fallback hc keybind $Mod-Shift-Return spawn st -e tmux hc keybind $Mod-r spawn spawn_rofi # basic movement # focusing clients hc keybind $Mod-Left focus left hc keybind $Mod-Down focus down hc keybind $Mod-Up focus up hc keybind $Mod-Right focus right # moving clients hc keybind $Mod-Shift-Left shift left hc keybind $Mod-Shift-Down shift down hc keybind $Mod-Shift-Up shift up hc keybind $Mod-Shift-Right shift right # splitting frames # create an empty frame at the specified direction hc keybind $Mod-v split bottom 0.5 hc keybind $Mod-h split right 0.5 hc keybind $Mod-o split auto # let the current frame explode into subframes hc keybind $Mod-Control-space split explode # resizing frames resizestep=0.05 hc keybind $Mod-Control-Left resize left +$resizestep hc keybind $Mod-Control-Down resize down +$resizestep hc keybind $Mod-Control-Up resize up +$resizestep hc keybind $Mod-Control-Right resize right +$resizestep # cycle through tags hc keybind $Mod-comma use_index +1 --skip-visible hc keybind $Mod-period use_index -1 --skip-visible # layouting hc keybind $Mod-Shift-r remove hc keybind $Mod-s floating toggle hc keybind $Mod-f fullscreen toggle hc keybind $Mod-p pseudotile toggle hc keybind $Mod-space cycle_layout +1 # mouse hc mouseunbind --all hc mousebind $Mod-Button1 move hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button3 resize # 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-i jumpto urgent # Volume hc keybind XF86AudioRaiseVolume spawn pulseaudio-ctl up hc keybind XF86AudioLowerVolume spawn pulseaudio-ctl down hc keybind XF86AudioMute spawn pulseaudio-ctl mute # Misc hc keybind Print spawn screenshot hc keybind XF86TouchpadToggle spawn touchpad # theme hc attr theme.tiling.reset 1 hc attr theme.floating.reset 1 hc set frame_border_width 0 hc set frame_bg_transparent 1 hc set frame_transparent_width 0 hc set frame_gap 0 hc set always_show_frame 0 hc set window_gap 10 hc set frame_padding 0 hc set smart_window_surroundings 0 hc set smart_frame_surroundings 0 hc set mouse_recenter_gap 0 hc set focus_follows_mouse 1 hc attr theme.tiling.outer_color '#000000' hc attr theme.floating.outer_color '#000000' hc attr theme.active.outer_color '#000000' hc attr theme.active.color '#e1485a' hc attr theme.normal.color '#f5f5f5' hc attr theme.urgent.color '#c81a71' hc attr theme.outer_width 3 hc attr theme.border_width 6 # tags #tag_names( term web img herb null foo ) #tag_keys=( {1..6} 0 ) tag_names=( "h" "e" "r" "b" "s" "t" ) 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 # rules hc unrule -F hc rule class=Firefox tag=h hc rule class=Steam tag=t hc rule focus=on # normally focus new clients 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 # tag modes hc floating t on # unlock, just to be sure hc unlock herbstclient set tree_style '╾│ ├└╼─┐' # find the panel panel=~/.config/herbstluftwm/panel [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh #for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do # start it on each monitor #"$panel" $monitor & "$panel" & #done