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

30 lines
634 B
Bash
Executable file

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