diff options
author | xyz <gky44px1999@gmail.com> | 2022-04-01 15:05:33 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2022-04-01 15:05:33 -0700 |
commit | 1eb01c43c6f6387000e197300648f6be69707c48 (patch) | |
tree | ac801f97877d976377b52ab05b52eaef7fb13b5a /home | |
parent | a7532d47d485658c70d95b40cd53bdc0a48fd738 (diff) |
sbar show gpu status
Diffstat (limited to 'home')
-rwxr-xr-x | home/xyz/.local/bin/sbar | 7 |
1 files changed, 6 insertions, 1 deletions
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 "<function>;display" "RTMIN+n" |