summaryrefslogtreecommitdiff
path: root/sway/status.sh
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-03-26 21:35:10 +0200
committerxengineering <me@xengineering.eu>2023-03-26 21:36:14 +0200
commit89ece2c0e0ca2c9d5f785cc03d4ee755e291f7d4 (patch)
treec08055342dad36d3d635b09bd748ea5c5b20ac45 /sway/status.sh
parent9f46d15398655ad480a4e028cbd6f1723e0a93e0 (diff)
downloaddotfiles-89ece2c0e0ca2c9d5f785cc03d4ee755e291f7d4.tar
dotfiles-89ece2c0e0ca2c9d5f785cc03d4ee755e291f7d4.tar.zst
dotfiles-89ece2c0e0ca2c9d5f785cc03d4ee755e291f7d4.zip
Add battery level to Sway statusbar
Diffstat (limited to 'sway/status.sh')
-rwxr-xr-xsway/status.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/status.sh b/sway/status.sh
index f29dfc8..03dfcd1 100755
--- a/sway/status.sh
+++ b/sway/status.sh
@@ -1,7 +1,8 @@
#!/bin/sh
+bat="BAT $(cat /sys/class/power_supply/BAT*/capacity | tr '\n' ' ')"
time="$(date '+KW %W %a %Y-%m-%d %H:%M')"
-echo "| ${time} |"
+echo "| ${bat}| ${time} |"