mirror of
https://gitlab.com/mattia.basaglia/ASCII-Pony.git
synced 2024-11-24 21:08:00 +01:00
Add temperature display
This commit is contained in:
parent
6cadee1852
commit
9fb527de0c
1 changed files with 5 additions and 0 deletions
|
@ -88,6 +88,11 @@ function ponyget_CPU_Usage()
|
|||
printf %.1f%% "$(top -b -n1 | grep "Cpu(s):" | sed -r -e "s/^[^0-9]+//" -e "s/[^0-9]+,\s+/ + /g" -e "s/[^0-9]+$//" | cut -d ' ' -f 1-5 | bc)"
|
||||
}
|
||||
|
||||
function ponyget_CPU_Temperature()
|
||||
{
|
||||
echo "$(echo "scale=1; $(cat /sys/devices/virtual/thermal/thermal_zone0/temp) / 1000" | bc) C"
|
||||
}
|
||||
|
||||
function ponyget_Uptime()
|
||||
{
|
||||
uptime | grep -oE "up.*user" | \
|
||||
|
|
Loading…
Reference in a new issue