summaryrefslogtreecommitdiff
path: root/sb-gpu
diff options
context:
space:
mode:
authorJoshua Drake <joshua.ellis.drake@gmail.com>2023-11-08 19:36:22 -0600
committerJoshua Drake <joshua.ellis.drake@gmail.com>2023-11-08 19:36:22 -0600
commit646d7ff97d93bd03576be7f747c44ba78e199812 (patch)
treeab859ad57460c0aaff5f2ac093d99c22a3bc3e77 /sb-gpu
parent40991f3809cdb3c39c3806d7eb6489c1f30d64de (diff)
Consolidated temp into one sed command to save .00001 clock cycles.
Diffstat (limited to 'sb-gpu')
-rwxr-xr-xsb-gpu2
1 files changed, 1 insertions, 1 deletions
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