summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-04-01 15:05:33 -0700
committerxyz <gky44px1999@gmail.com>2022-04-01 15:05:33 -0700
commit1eb01c43c6f6387000e197300648f6be69707c48 (patch)
treeac801f97877d976377b52ab05b52eaef7fb13b5a /home
parenta7532d47d485658c70d95b40cd53bdc0a48fd738 (diff)
sbar show gpu status
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/sbar7
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"