Fix hyprland, monitor management and waybar after lua switch
This commit is contained in:
9
.config/waybar/scripts/power-monitor.sh
Executable file
9
.config/waybar/scripts/power-monitor.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
RAPL0="/sys/class/powercap/intel-rapl:0/energy_uj"
|
||||
RAPL1="/sys/class/powercap/intel-rapl:1/energy_uj"
|
||||
while true; do
|
||||
e1=$(( $(cat "$RAPL0") + $(cat "$RAPL1") ))
|
||||
sleep 2
|
||||
e2=$(( $(cat "$RAPL0") + $(cat "$RAPL1") ))
|
||||
echo "scale=1; ($e2 - $e1) / 2000000" | bc > /tmp/power_now
|
||||
done
|
||||
Reference in New Issue
Block a user