Merge pull request #168 from tarantila/patch-1

Display CPU label on CPU load configuration
This commit is contained in:
Ethan Edwards 2023-04-08 14:49:40 -04:00 committed by GitHub
commit 8dbb6be109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
if [ "$cpu_load" = true ]; then
echo "$(get_load)"
else
cpu_label=$(get_tmux_option "@dracula-cpu-usage-label" "CPU")
if [ "$cpu_load" = true ]; then
echo "$cpu_label $(get_load)"
else
cpu_percent=$(get_percent)
echo "$cpu_label $cpu_percent"
fi