diff options
Diffstat (limited to '')
-rw-r--r-- | bin/dzen2_pgrp.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/dzen2_pgrp.sh b/bin/dzen2_pgrp.sh index 63fa325..531fe19 100644 --- a/bin/dzen2_pgrp.sh +++ b/bin/dzen2_pgrp.sh @@ -10,8 +10,11 @@ CLOCK_WIDTH=$(textwidth "$FONT" "$(date)") OFFSET=$((OFFSET - $CLOCK_WIDTH - 20)) sh "${DIR}/bin/clock.sh" | dzen2 -xs ${SCREEN} -x ${OFFSET} -w $(($CLOCK_WIDTH + 20)) -fn "${FONT}" -bg black -l 17 -p -sa c -e 'button1=exec:xscreensaver-command -lock;button3=exec:xcalendar;button2=exec:xscreensaver-command -prefs;onstart=collapse;entertitle=uncollapse,unhide;leavetitle=collapse' & -OFFSET=$((OFFSET - 120)) -sh "${DIR}/bin/bat.sh" | dzen2 -xs ${SCREEN} -x ${OFFSET} -w 120 -fn "${FONT}" -bg black -e 'button1=none' & +if [ -e "/proc/acpi/battery/BAT0" ]; then + # if battery is available, display battery widget + OFFSET=$((OFFSET - 120)) + sh "${DIR}/bin/bat.sh" | dzen2 -xs ${SCREEN} -x ${OFFSET} -w 120 -fn "${FONT}" -bg black -e 'button1=none' & +fi OFFSET=$((OFFSET - 120)) gcpubar -fg '#999' -bg '#444' -w 50 -h 7 -l "^i(${DIR}/icons/cpu.xbm) " | \ |