#!/bin/bash # # Herbstluftwm autostart file. # This file will automatically load all files in /etc/herbstluftwm/autostart.d current_script="/etc/xdg/herbstluftwm/autostart" # Override herbstclient to display errors with filename & parameters herbstclient() { command herbstclient "$@" || { echo " * WARNING: herbstclient returned $?" echo " * $current_script:" echo " * herbstclient $*" } } herbstclient emit_hook reload # remove all existing keybindings herbstclient keyunbind --all # Load all files in /etc/herbstluftwm.d/ for script in /etc/herbstluftwm/autostart.d/* ; do current_script=$script [[ -r $script ]] && . "$script" done unset script current_script # unlock, just to be sure herbstclient unlock