Added delayed refreshing.

This commit is contained in:
Archie Hilton (thytom) 2019-10-21 20:15:51 +01:00
parent 2d17c849c9
commit b5c4b37658
2 changed files with 5 additions and 3 deletions

4
dwmbar
View file

@ -13,4 +13,6 @@ echo "dwmbar $VERSION"
}
xsetroot -name "$(exec $RC_LOCATION)"
while :; do
xsetroot -name "$(exec $RC_LOCATION)"
done

View file

@ -4,18 +4,18 @@ MODULES_DIR="modules/"
SEPARATOR=" | "
MODULES="test archupdates weather date time"
MODULES="volume temperature date time battery"
run_modules(){
for module in $MODULES; do
[[ ! "$OUTPUT" = "" ]] && OUTPUT="$OUTPUT$SEPARATOR"
OUTPUT="$OUTPUT$(exec $MODULES_DIR$module)"
done
}
run(){
run_modules
sleep 5; # Delays script before it's called again
echo $OUTPUT
}