From 1eb01c43c6f6387000e197300648f6be69707c48 Mon Sep 17 00:00:00 2001 From: xyz Date: Fri, 1 Apr 2022 15:05:33 -0700 Subject: sbar show gpu status --- home/xyz/.local/bin/sbar | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'home/xyz/.local/bin') diff --git a/home/xyz/.local/bin/sbar b/home/xyz/.local/bin/sbar index de27cac7..9bb08b88 100755 --- a/home/xyz/.local/bin/sbar +++ b/home/xyz/.local/bin/sbar @@ -32,14 +32,19 @@ update_bat () { bat="$(cat /sys/class/power_supply/BAT0/capacity)%" } +update_gpu () { + gpu="$(envycontrol --status | awk 'END{print toupper(substr($NF,0,1))}')" +} + display () { - xsetroot -name "$time | N $net V $vpn | M $vol C $mic | $bat" + xsetroot -name "$time | N $net V $vpn | M $vol C $mic | $gpu | $bat" } # modules that don't update on their own need to be run at the start for getting their initial value update_net update_vol update_mic +update_gpu # SIGNALLING # trap ";display" "RTMIN+n" -- cgit v1.2.3-70-g09d2