mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 15:43:17 +02:00
feat: shorten cpu, gpu and network info
This commit is contained in:
parent
bd6250c0fe
commit
220a2af392
@ -45,4 +45,4 @@ if [[ "$cpu_temp" != "N/A" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "<span color=\"$cpu_color\"> CPU: ${cpu_temp}°C, Load: ${cpu_load}</span>"
|
||||
echo -e "<span color=\"$cpu_color\"> ${cpu_temp}°C, ${cpu_load}</span>"
|
||||
@ -59,7 +59,7 @@ else
|
||||
fi
|
||||
|
||||
# Output<
|
||||
echo -e "<span color=\"$gpu_color\"> GPU: ${gpu_temp}, Load: ${gpu_load}%</span>"
|
||||
echo -e "<span color=\"$gpu_color\"> ${gpu_temp}, ${gpu_load}%</span>"
|
||||
echo
|
||||
echo "#FFFFFF" # Default color for fallback (ignored if markup is enabled)
|
||||
|
||||
|
||||
@ -75,5 +75,5 @@ rx_rate_human=$(numfmt --to=iec --suffix=B/s $total_rx_rate)
|
||||
tx_rate_human=$(numfmt --to=iec --suffix=B/s $total_tx_rate)
|
||||
|
||||
# Output the result with fixed width
|
||||
printf " DL: %-8s UL: %-8s\n" "$rx_rate_human" "$tx_rate_human"
|
||||
printf " %-7s %-7s\n" "$rx_rate_human" "$tx_rate_human"
|
||||
echo "#50FA7B"
|
||||
Loading…
Reference in New Issue
Block a user