summaryrefslogtreecommitdiff
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-09 03:42:14 -0600
commite4e504c32c7fd3cf49a57ad18aacf00c9c9d4c47 (patch)
treeab859ad57460c0aaff5f2ac093d99c22a3bc3e77
parent40991f3809cdb3c39c3806d7eb6489c1f30d64de (diff)
Consolidated temp into one sed command to save .00001 clock cycles.
-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