Conky Compiz startup (en)

From Conky PitStop

Revision as of 14:32, 25 May 2012 by DK75 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Conky Compiz startup

User:DK75

 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.

Personal tools
Namespaces
Variants
Actions
Navigation
English
Français
Toolbox