From b44cdd894e77947b7465be9312490c28c7208231 Mon Sep 17 00:00:00 2001 From: Joel Mathew Thomas <90510078+joelmathewthomas@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:05:33 +0530 Subject: [PATCH] fixed bugs in fanctl --- .local/bin/fanctl | 30 ++++++++++++++++++++---------- .local/bin/stats/fanstat | 6 +++--- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.local/bin/fanctl b/.local/bin/fanctl index 2561335..0655c00 100755 --- a/.local/bin/fanctl +++ b/.local/bin/fanctl @@ -53,13 +53,18 @@ case $1 in if [[ $new_speed -lt 100 ]]; then nbfc set -f 0 1 -s $new_speed text="custom" - tooltip="$new_speed%" - class="custom" - else - text=$textstat + tooltip="$new_speed%" + class="custom" + else + text=$textstat + tooltip="$tooltipstat" + class=$classstat + + fi + else + text=$textstat tooltip="$tooltipstat" class=$classstat - fi fi ;; decr) @@ -69,13 +74,18 @@ case $1 in if [[ $new_speed -gt 0 ]]; then nbfc set -f 0 1 -s $new_speed text="custom" - tooltip="$new_speed%" - class="custom" - else - text=$textstat + tooltip="$new_speed%" + class="custom" + else + text=$textstat + tooltip="$tooltipstat" + class=$classstat + + fi + else + text=$textstat tooltip="$tooltipstat" class=$classstat - fi fi ;; *) diff --git a/.local/bin/stats/fanstat b/.local/bin/stats/fanstat index 0b1caf3..81ffc21 100644 --- a/.local/bin/stats/fanstat +++ b/.local/bin/stats/fanstat @@ -1,3 +1,3 @@ -textstat=min -tooltipstat=30% -classstat=min +textstat=auto +tooltipstat=Auto +classstat=auto