summaryrefslogtreecommitdiff
path: root/.dwmSession.sh
diff options
context:
space:
mode:
authorJulian <j@teule.nl>2018-10-20 01:21:49 +0200
committerJulian <j@teule.nl>2018-10-20 01:21:49 +0200
commit4e2e2ea2db51075f4269e4b38429c719688aa759 (patch)
treee4dbef7e0d7de6c65f529bbbcfae020053eadf86 /.dwmSession.sh
parente65754ce0c0d8696316b7a8ec0bb28b4ee902dd5 (diff)
Added lots of new stuff
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