#!/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)"