useful_scripts/xsetroot/sysstatus.sh

13 lines
461 B
Bash
Raw Permalink Normal View History

2023-03-24 14:40:17 -03:00
clear
while true; do
curtime=$(date +%T)
curdate=$(date +'%a %d/%m')
curtemp=$(bc -l <<< "scale = 1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000")
curfreq=$(sudo cpupower frequency-info -wm | awk {'print $4 $5'} | grep "\S")
curram=$(free -h | grep Mem | awk '{print $3"/"$2}')
status="$curram - $curtempºC - @$curfreq - $curdate $curtime"
printf "%s" "${status}"
for (( i=0; i<="${#status}"; i++ )) ; do printf "\b"; done
sleep 1
done