aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-03-19 08:23:37 +0000
committerMatthew Lemon <y@yulqen.org>2024-03-19 08:23:37 +0000
commitc8eb3067fb0886723a2565e33776cadc6e90f2ec (patch)
tree4532a638660bbd1996e428b05016e4f3c75d0854
parent5f65ad7d6be4b7840ce21569826ebffcc415e900 (diff)
Adds battery info to sway statusbar
-rwxr-xr-xstatus_command_for_swaybar.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/status_command_for_swaybar.sh b/status_command_for_swaybar.sh
index ab48c88..b044fde 100755
--- a/status_command_for_swaybar.sh
+++ b/status_command_for_swaybar.sh
@@ -1,8 +1,8 @@
#/bin/sh
net="$(ip a|grep "inet 192"|cut -d' ' -f6|cut -d'/' -f1)"
-toss="Toss!"
packages="$(dpkg --get-selections|wc -l)"
weather="$(ansiweather -l Berwick-upon-Tweed,GB -f 1 -a false -s true -w true -d true)"
+batt="$(cat /sys/class/power_supply/BAT0/capacity)"
-echo "$weather | dpkg: $packages | $net | $(date +"%Y-%m-%d %I:%M:%S %p")"
+echo "$weather | dpkg: $packages | bat: $batt | $net | $(date +"%Y-%m-%d %I:%M:%S %p")"