summaryrefslogtreecommitdiff
path: root/.dwmSession.sh
diff options
context:
space:
mode:
Diffstat (limited to '.dwmSession.sh')
-rwxr-xr-x.dwmSession.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/.dwmSession.sh b/.dwmSession.sh
new file mode 100755
index 0000000..5e9b4e3
--- /dev/null
+++ b/.dwmSession.sh
@@ -0,0 +1,19 @@
+#!/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")
+
+ xsetroot -name "$TIME $BATT%"
+ sleep 10
+done