23 lines
460 B
Bash
Executable file
23 lines
460 B
Bash
Executable file
#!/usr/bin/env sh
|
|
PATH=$PATH:$HOME/bin
|
|
CONFIG=$HOME/.config/sway/sov.d
|
|
FIFO=/tmp/sovpipe
|
|
CMD="sov"
|
|
ARGS=" -t 500 -v -s $CONFIG"
|
|
LOG=$HOME/log/sov.log
|
|
|
|
which $CMD &> /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "missing $CMD executable in PATH"
|
|
exit 1
|
|
fi
|
|
|
|
# Terminate already running bar instances
|
|
pkill -x $CMD
|
|
rm -f $LOG
|
|
# create fifo
|
|
rm -f $FIFO
|
|
mkfifo $FIFO
|
|
# execute new instance
|
|
echo $CMD $ARGS | tee -a $LOG
|
|
tail -f $FIFO | $CMD $ARGS 2>&1 | tee -a $LOG
|