diff options
author | Joshua Drake <joshua.ellis.drake@gmail.com> | 2023-11-07 17:07:16 -0600 |
---|---|---|
committer | Joshua Drake <joshua.ellis.drake@gmail.com> | 2023-11-07 17:07:16 -0600 |
commit | 40991f3809cdb3c39c3806d7eb6489c1f30d64de (patch) | |
tree | 7ddbb86722450c1ff594d7f5364b0d3fb68c3419 /sb-gpu |
inital commit
Diffstat (limited to 'sb-gpu')
-rwxr-xr-x | sb-gpu | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/bin/sh + +getGPUClock() { + echo "$GPUClock" | 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 +} +getGPUTemperature() { + echo "$GPUTemp" | grep -o "[0-9]\{2\}" /sys/class/drm/card1/device/hwmon/hwmon1/temp1_input | head -1 +} + +case $BLOCK_BUTTON in + #1) notify-send "RadeonTop" "$(radeontop)" ;; + 2) setsid -f "$TERMINAL" -e radeontop ;; + 3) notify-send "GPU Module" "\- Shows graphics core utilization. +- Middle Click to show RadeonTop." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +printf "%s %s%% 🌡️%s°\n" "$(getGPUClock)" "$(getGPUBusy)" "$(getGPUTemperature)" |