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.
This commit is contained in:
parent
150daf31e1
commit
731114654d
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue