diff --git a/bin/conky_toggle b/bin/conky_toggle new file mode 100755 index 0000000..0b7417d --- /dev/null +++ b/bin/conky_toggle @@ -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