From c3c37fbe3073cf266b3c97f76d596e9568be0a48 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 26 Mar 2023 21:35:10 +0200 Subject: Add battery level to Sway statusbar --- sway/status.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sway') 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} |" -- cgit v1.2.3-70-g09d2