From 646d7ff97d93bd03576be7f747c44ba78e199812 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Wed, 8 Nov 2023 19:36:22 -0600 Subject: Consolidated temp into one sed command to save .00001 clock cycles. --- sb-gpu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb-gpu b/sb-gpu index 45dec9d..75a493a 100755 --- a/sb-gpu +++ b/sb-gpu @@ -7,7 +7,7 @@ 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 + echo "$GPUTemp" | sed -n "s/000//;p" /sys/class/drm/card1/device/hwmon/hwmon1/temp1_input } case $BLOCK_BUTTON in -- cgit v1.2.3