You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12 lines
542 B

#!/bin/bash
source $(dirname $0)/config.sh
XPOS=$((1120 + $XOFFSET))
WIDTH="80"
LINES="2"
battime=$(acpi -b | sed -n "1p" | awk -F " " '{print $5}')
batperc=$(acpi -b | sed -n "1p" | awk -F " " '{print $4}' | head -c3)
batstatus=$(acpi -b | cut -d',' -f1 | awk -F " " '{print $3}')
(echo " ^fg($highlight)Battery"; echo " ^fg()$batstatus"; echo " ^fg($highlight)$battime ^fg()left"; sleep 15) | dzen2 -fg $foreground -bg $background -fn $FONT -x $XPOS -y $YPOS -w $WIDTH -l $LINES -e 'onstart=uncollapse,hide;button1=exit;button3=exit'