#!/bin/bash # # Global wrapper script to control the selected # herbstluftwm panel. Usage: # # herbstpanel # # Panels that are used in combination with this wrapper # must implement the following interface: # # ./panel # # Unrecognized actions will be passed to the selected # panel, but are not needed ideally. die() { echo " * ERROR: $*" >&2 exit 1 } usage() { echo "Usage: herbstpanel " } # Check panel existence [[ ! -x /etc/herbstluftwm/panel ]] && \ die "/etc/herbstluftwm/panel does not exist (or is not executable)!" # Check correct parameter count [[ $# == 0 ]] && \ usage && die "No action given" /etc/herbstluftwm/panel "$1"