mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
baraction: Improve formatting of CPU speed
If the CPU is throttled to less than 1 GHz, the contents of the bar will move around a bit; always use 4 digits to print the CPU frequency so that doesn't happen.
This commit is contained in:
parent
9c77876ca8
commit
97b3f52ea8
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ print_apm() {
|
||||||
|
|
||||||
print_cpuspeed() {
|
print_cpuspeed() {
|
||||||
CPU_SPEED=`/sbin/sysctl hw.cpuspeed | cut -d "=" -f2`
|
CPU_SPEED=`/sbin/sysctl hw.cpuspeed | cut -d "=" -f2`
|
||||||
echo -n "CPU speed: $CPU_SPEED MHz "
|
printf "CPU speed: %4d MHz " $CPU_SPEED
|
||||||
}
|
}
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue