diff options
author | Joshua Drake <joshua.ellis.drake@gmail.com> | 2023-11-10 01:14:11 -0600 |
---|---|---|
committer | Joshua Drake <joshua.ellis.drake@gmail.com> | 2023-11-10 01:16:23 -0600 |
commit | ea81343cdfeb6e9c09e1bf45a8ef0935459f15b5 (patch) | |
tree | 745d4dcfdf4b50b0b548f7d1dbe76f01f0851acf /sb-gpu | |
parent | 9f6592813bfc8edb282c549070eb6e1aff838f91 (diff) |
Consolidated deez VRAM Yamean? Word to your mother. -Dallas
Diffstat (limited to 'sb-gpu')
-rwxr-xr-x | sb-gpu | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,13 +1,17 @@ #!/bin/sh getGPUClock() { - echo "$GPUClock" | sed -n "s/[0-9]: //g;/*/ {s/\s.*//; p}" /sys/class/drm/card1/device/pp_dpm_sclk + sed -n "s/[0-9]: //g;/*/ {s/\s.*//; p}" /sys/class/drm/card1/device/pp_dpm_sclk } getGPUBusy() { - echo "$GPUBusy" | cat /sys/class/drm/card1/device/gpu_busy_percent + cat /sys/class/drm/card1/device/gpu_busy_percent } getGPUTemperature() { - echo "$GPUTemp" | sed "s/000//" /sys/class/drm/card1/device/hwmon/hwmon1/temp1_input + sed "s/000//" /sys/class/drm/card1/device/hwmon/hwmon1/temp1_input +} +getGPUVRAM() { + usedRAM=$(cat /sys/class/drm/card1/device/mem_info_vram_used) + numfmt --to=iec $usedRAM --format %2.2f } case $BLOCK_BUTTON in @@ -18,4 +22,4 @@ case $BLOCK_BUTTON in 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac -printf "%s %s%% 🌡️%s°\n" "$(getGPUClock)" "$(getGPUBusy)" "$(getGPUTemperature)" +printf "%s %s %s%% 🌡️%s°\n" "$(getGPUClock)" "$(getGPUVRAM)" "$(getGPUBusy)" "$(getGPUTemperature)" |