config_sway/bin/start_sov.sh

24 lines
460 B
Bash
Raw Normal View History

2022-08-25 10:55:10 +02:00
#!/usr/bin/env sh
PATH=$PATH:$HOME/bin
2023-12-19 10:17:55 +01:00
CONFIG=$HOME/.config/sway/sov.d
2022-08-25 10:55:10 +02:00
FIFO=/tmp/sovpipe
CMD="sov"
2023-12-20 08:02:41 +01:00
ARGS=" -t 500 -v -s $CONFIG"
2022-08-25 10:55:10 +02:00
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
2023-12-19 10:17:55 +01:00
echo $CMD $ARGS | tee -a $LOG
2022-08-25 10:55:10 +02:00
tail -f $FIFO | $CMD $ARGS 2>&1 | tee -a $LOG