mirror of
https://github.com/10h30/endeavouros-i3wm-setup.git
synced 2026-07-11 18:55:54 +09:00
Update cpu_usage
changed:
printf "%.${decimals}f%%\n", $cpu_usage;
to:
printf "%02.${decimals}f%%\n", $cpu_usage;
lines 50 + 52
for this:
always print two digits (leading zero) in front of the decimal point
see here:
https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/2?u=joekamprad
This commit is contained in:
@@ -47,9 +47,9 @@ $cpu_usage eq -1 and die 'Can\'t find CPU information';
|
||||
|
||||
# Print short_text, full_text
|
||||
print "${label}";
|
||||
printf "%.${decimals}f%%\n", $cpu_usage;
|
||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||
print "${label}";
|
||||
printf "%.${decimals}f%%\n", $cpu_usage;
|
||||
printf "%02.${decimals}f%%\n", $cpu_usage;
|
||||
|
||||
# Print color, if needed
|
||||
if ($cpu_usage >= $t_crit) {
|
||||
|
||||
Reference in New Issue
Block a user