conky_toggle

master
Daniel Napora 2021-05-28 02:57:30 +02:00
parent 539760b422
commit 86ce72d3f4
1 changed files with 15 additions and 0 deletions

15
bin/conky_toggle 100755
View File

@ -0,0 +1,15 @@
#!/bin/bash
SESSIONFILE=$HOME/.config/conky/conky-sessionfile
while read -r line; do
THIS_CONKY=$(echo $line | awk '{print $3}')
CONKYRC=${THIS_CONKY//\'/}
if ! pgrep -f "${CONKYRC//\~/}"
then
conky -c "${CONKYRC//\~/$HOME}" &
else
pkill -f "${CONKYRC//\~/}"
fi
done < $SESSIONFILE
exit 0