blob: 3274e7abba9336ed8cc7220731331d9186c0a88f (
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=$(ip -4 a | grep "inet " | sed "s:inet \(.*\)/.*:\1:" | tr -d " " | tr "\n" " ")
xsetroot -name "$IP $TIME $BATT%"
sleep 10
done
|