mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
bold cpu speed, but not unit
This commit is contained in:
parent
3028eb8b3b
commit
cece22d7d5
1 changed files with 5 additions and 3 deletions
|
@ -24,8 +24,10 @@ grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
|||
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | awk -F"[:.]" '{print $2}'` || mhz=`grep -m 1 "^clock" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
|
||||
|
||||
if [ $mhz -ge 1000 ]; then
|
||||
ghz=$(echo $mhz | awk '{ printf "%.2f", $1 / 1000 }')
|
||||
printf "\005{= cW}%sGHz\005{-} " $ghz
|
||||
speed=$(echo $mhz | awk '{ printf "%.2f", $1 / 1000 }')
|
||||
unit="GHz"
|
||||
else
|
||||
printf "\005{= cW}%sMHz\005{-} " $mhz
|
||||
speed="$mhz"
|
||||
unit="MHz"
|
||||
fi
|
||||
printf "\005{=b cW}%s\005{-}\005{= cW}$unit\005{-} " $mhz
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue