Thread: Help with loop script.
i wrote script output current desktop when using compiz virtual desktops used conky.
i added script startup applications found remained running whencode:#!/bin/bash #set -x ############################################################### ## script output desktop number when running compiz ## ## 4x1 virtual desktops , 1680x1050 resolution. ## ############################################################### # use wmctrl -d | awk '{print $6}' determine coordinates each virtual desktop if use 2x2 sleep 3 ##wait conky load while true; do sleep 2 coordinate=$(wmctrl -d | awk '{print $6}') if [ "$coordinate" == "0,0" ]; echo 1 > ~/.desktop.txt elif [ "$coordinate" == "1680,0" ]; echo 2 > ~/.desktop.txt elif [ "$coordinate" == "3360,0" ]; echo 3 > ~/.desktop.txt elif [ "$coordinate" == "5040,0" ]; echo 4 > ~/.desktop.txt fi done
logged out , started instance upon login.
fixed changing...
tocode:while true; do
just wondered if putting in startup applications not correct waycode:while pidof conky; do
start kind of script
or
there supposed add script exits when logging out.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Help with loop script.
Ubuntu
Comments
Post a Comment