blob: 2c427b84991395883d79e7f87009f19e22badb63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
PIDFILE=/home/julian/.dwmSession.pid
kill `cat $PIDFILE`
if [ "$1" = "-e" ]; then
exit
fi
echo $$ > $PIDFILE
while true; do
BATT=$( acpi -b | sed 's/.*[charging|unknown], \([0-9]*\)%.*/\1/gi' )
TIME=$(/bin/date +"%H:%M")
IP=$(hostname -i)
xsetroot -name "$IP $TIME $BATT%"
sleep 10
done
|