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
commitc3c37fbe3073cf266b3c97f76d596e9568be0a48 (patch)
treec08055342dad36d3d635b09bd748ea5c5b20ac45 /sway/status.sh
parent1fd045367b5ebf5070a51a0caa97ccb705e20c4c (diff)
downloaddotfiles-c3c37fbe3073cf266b3c97f76d596e9568be0a48.tar
dotfiles-c3c37fbe3073cf266b3c97f76d596e9568be0a48.tar.zst
dotfiles-c3c37fbe3073cf266b3c97f76d596e9568be0a48.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} |"