because reading Intel RAPL requires root (and also is NOT safe to make it globally readable)
- esc/q to exit
- +/- to change font size
- up/down to change opacity
- drag to move
gcc main.c -o power-overlay `sdl2-config --cflags --libs` -lSDL2_gfx -lm
power-overlay.sh
#!/bin/bash
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /home/user/.local/bin/power-overlaypower-overlay.desktop
[Desktop Entry]
Name=power overlay
Exec=power-overlay
Type=Application