#!/bin/bash # # Wrapper for default herbstluftwm panel die() { echo " * ERROR: $*" >&2 exit 1 } stop() { herbstclient emit_hook quit_panel } start() { for monitor in $(herbstclient list_monitors | cut -d: -f1); do /etc/xdg/herbstluftwm/panel.sh "$monitor" & done } action="$1" shift case "$action" in start) start ;; restart) stop start ;; stop) stop ;; *) die "Unknown action '$action'" ;; esac