helm/os/arch/.config/panel/panel-notify

35 lines
742 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
if ! pgrep lemonbar >/dev/null; then
>&2 echo "Lemonbar isn't running"
exit 1
fi
2016-11-20 17:42:29 -08:00
CWD=$(dirname $0)
if [[ -t 0 ]]; then
if (( $# == 0 )); then
>&2 echo "Usage: panel_update.sh [LEMON_TO_UPDATE]"
exit 1
fi
2016-11-20 17:42:29 -08:00
case $1 in
:*) LEMON="$CWD/lemons/${1#?}"
2016-11-20 17:42:29 -08:00
if [[ ! -f $LEMON ]]; then
>&2 echo "Couldn't find that lemon ($1)"
exit 2
fi
2016-11-20 17:42:29 -08:00
. "$CWD/panel-config"
pkill -f "[bd]ash .+/lemons/${1#?}"
"$LEMON" > "$PANEL_FIFO" &
;;
*) echo "$@" | $0
;;
esac
else
. $CWD/panel-config
2016-11-20 17:42:29 -08:00
while read -r line; do
echo "$line" > "$PANEL_FIFO" &
done
fi