From 7aca22798e996f9153502cba2c14409daf92d14c Mon Sep 17 00:00:00 2001 From: esche Date: Sun, 24 Sep 2023 21:41:34 +0200 Subject: [PATCH] added battery --- .config/sway/status.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/sway/status.sh b/.config/sway/status.sh index 8836ebe..94e85a3 100644 --- a/.config/sway/status.sh +++ b/.config/sway/status.sh @@ -19,4 +19,14 @@ is_wayland=$( } ') -echo $is_wayland "|" $audio_volume $audio_muted "|" $date_formatted +battery=$( + acpi -b | + awk '{ + print $4+0 "%" + if($3=="Charging,") print "🔌"; + print ($4+0>25) ? "🔋" : "đŸĒĢ"; + }') + +output="" +if [[ $is_wayland != "" ]]; then output="$is_wayland | "; fi +echo $output $battery "|" $audio_volume $audio_muted "|" $date_formatted