power menu, redshift, polybar
This commit is contained in:
13
.config/polybar/scripts/system-cpu-frequency/README.md
Normal file
13
.config/polybar/scripts/system-cpu-frequency/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Script: system-cpu-frequency
|
||||
|
||||
A shell script that shows the average core frequency (average over number, not over time) in GHz.
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/system-cpu-frequency]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/system-cpu-frequency.sh
|
||||
interval = 10
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
c=0;t=0
|
||||
|
||||
awk '/MHz/ {print $4}' < /proc/cpuinfo | (while read -r i
|
||||
do
|
||||
t=$( echo "$t + $i" | bc )
|
||||
c=$((c+1))
|
||||
done
|
||||
echo "scale=2; $t / $c / 1000" | bc | awk '{print $1" GHz"}')
|
||||
Reference in New Issue
Block a user