Conky Compiz startup (en)
From Conky PitStop
Conky Compiz startup
Language | English Français |
This little script wait for DBUS to report that COMPIZ is running and then start Conky from directory in witch this script is stored. But after 30 seconds it stop waiting for COMPIZ and start Conky anyway:
#!/bin/bash j=1 until $_DONE do if [ $(dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/dbus/screen0 org.freedesktop.compiz.list 2>/dev/null | wc -l) -ne 0 ] then _DONE=true elif [ $j -gt 6 ] then _DONE=true else _DONE=false sleep 5 let $[++j] fi done SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" cd ${DIR} && conky -c ${DIR}"/.conkyrc" exit 1
Just put it in a directory where your ".conkyrc" file is and run it.