osd/osd-game.sh
1	#!/bin/bash
2
3 cpuTemp() {
4
5 CPUTEMP=$(sensors | grep CPU | awk '{print $2}' | grep -o [0-9][0-9]||[0-9][0-9][0-9])
6 CPUFREQ=$(lscpu | grep MHz | head -n1 | awk '{print $3}')
7
8 echo -n "CPU Temp: $CPUTEMP° > CPU Freq: $CPUFREQ"
9
10 }
11
12 loadAvg() {
13
14 la=$(uptime | grep -o :\ [0-9].* | sed s/://g | awk '{print $1}' | sed s/,//g)
15 echo -n "Load: $la"
16
17 }
18
19 while true; do
20 echo -ne "$(cpuTemp) $(loadAvg)\n"
21 sleep 1
22 done