aboutsummaryrefslogtreecommitdiff
path: root/dwmbar
diff options
context:
space:
mode:
Diffstat (limited to 'dwmbar')
-rwxr-xr-xdwmbar33
1 files changed, 33 insertions, 0 deletions
diff --git a/dwmbar b/dwmbar
new file mode 100755
index 0000000..af9442f
--- /dev/null
+++ b/dwmbar
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+delim="|"
+
+check_audio()
+{
+ volume="`dwmaudio` $delim"
+}
+
+check_datetime()
+{
+ datetime=`date '+%d %B %Y %H:%M:%S'`
+}
+
+check_weather()
+{
+ weather="`cat ~/.dwm/weather_report` $delim"
+}
+
+check_battery()
+{
+ battery="`sysctl hw.acpi.battery | grep life | sed -E 's/.*: (.*)/\1%/'` $delim"
+}
+
+while true; do
+ check_datetime
+ check_weather
+ check_audio
+ check_battery
+ xsetroot -name "$battery $weather $volume $datetime";
+ sleep 1;
+done
+