summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-05-22 12:09:43 -0400
committerMalfurious <m@lfurio.us>2023-05-23 17:19:40 -0400
commit58c7697180ff43204c615825ca5805e3ba218046 (patch)
tree09c1fa17c1392e1af71f51ed0610236559963c76
parent6494be5723898aadf35ac27a64b05a42ea5a7c9b (diff)
downloadrice-58c7697180ff43204c615825ca5805e3ba218046.tar.gz
rice-58c7697180ff43204c615825ca5805e3ba218046.zip
dwm: Add battery level to statusbar
-rw-r--r--.xinitrc13
1 files changed, 8 insertions, 5 deletions
diff --git a/.xinitrc b/.xinitrc
index 0aee19a..8633bfc 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -1,10 +1,13 @@
-picom --config /dev/null -bfD3 --xrender-sync-fence
-~/.fehbg
+statusbar() {
+ acpi -b | awk '{print $4}' | sed 's/,//;/100/d'
+ date '+%F %R'
+}
-while true
-do
- xsetroot -name "$(date "+%F %R")"
+while true; do
+ xsetroot -name "$(statusbar | sed -z 's/\n/ | /g;s/ *$//')"
sleep 1m
done &
+picom --config /dev/null -bfD3 --xrender-sync-fence
+~/.fehbg
exec dwm