mirror of
https://github.com/morgan9e/power-overlay
synced 2026-04-14 00:14:06 +09:00
33 lines
680 B
Markdown
33 lines
680 B
Markdown
# power-overlay
|
|
|
|
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
|
|
|
|
<img width="250" alt="image" src="https://github.com/user-attachments/assets/5d390a20-6156-4857-acf4-bf7259e0adcf" />
|
|
|
|
### compile
|
|
|
|
```
|
|
gcc main.c -o power-overlay `sdl2-config --cflags --libs` -lSDL2_gfx -lm
|
|
```
|
|
|
|
### if you want to add a desktop file
|
|
|
|
power-overlay.sh
|
|
```bash
|
|
#!/bin/bash
|
|
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /home/user/.local/bin/power-overlay
|
|
```
|
|
|
|
power-overlay.desktop
|
|
```
|
|
[Desktop Entry]
|
|
Name=power overlay
|
|
Exec=power-overlay
|
|
Type=Application
|
|
```
|