You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
6 months ago | |
---|---|---|
img | 11 months ago | |
libs | 6 months ago | |
man | 6 months ago | |
src | 6 months ago | |
.gitignore | 11 months ago | |
.gitmodules | 6 months ago | |
LICENSE | 11 months ago | |
README.md | 6 months ago | |
build.zig | 6 months ago |
README.md
gpower2
A power dialog written in zig using GTK4.
Configuration
gpower2 uses a config file located at $XDG_CONFIG_HOME/gpower/config.ini
.
This file configures how gpower2 will execute actions when a button is clicked.
This is the default config:
[commands]
shutdown = systemctl poweroff
reboot = systemctl reboot
suspend = systemctl suspend
hibernate = systemctl hibernate
This config will be used if the config file can't be opened. If a value is omitted, gpower2 will use the default.
Example custom config to activate i3lock before suspend/hibernate:
[commands]
suspend = sh -c 'i3lock -c 660000 && systemctl suspend'
hibernate = sh -c 'i3lock -c 660000 && systemctl hibernate'
Dependencies
gpower2 requires only a zig compiler and gtk4 to build.
Also note that it uses systemctl
to execute actions be default, but this can be changed in the config.
Building
The usual zig way, zig build
.
For release builds, use zig build -Drelease-fast
.
Installation
Arch Linux: gpower2-git AUR package
Other: ¯\_(ツ)_/¯