From 731114654d4471606d7c5dfa16b473a1594300f8 Mon Sep 17 00:00:00 2001 From: tarantila <5209092+tarantila@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:12:26 +0200 Subject: [PATCH] Display CPU label on CPU load configuration Change to display the defined value of "dracula-cpu-usage-label" (e.g. CPU) when load average is used instead percentage. Before this change the label was not displayed if CPU load average is used. --- scripts/cpu_info.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cpu_info.sh b/scripts/cpu_info.sh index 41b49c1..b73db09 100755 --- a/scripts/cpu_info.sh +++ b/scripts/cpu_info.sh @@ -44,10 +44,10 @@ main() { # storing the refresh rate in the variable RATE, default is 5 RATE=$(get_tmux_option "@dracula-refresh-rate" 5) cpu_load=$(get_tmux_option "@dracula-cpu-display-load" false) + cpu_label=$(get_tmux_option "@dracula-cpu-usage-label" "CPU") if [ "$cpu_load" = true ]; then - echo "$(get_load)" + echo "$cpu_label $(get_load)" else - cpu_label=$(get_tmux_option "@dracula-cpu-usage-label" "CPU") cpu_percent=$(get_percent) echo "$cpu_label $cpu_percent" fi