Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thesola10/power-profiles-hooks
D-Bus listener to run custom hooks with power-profiles-daemon switching events
https://github.com/thesola10/power-profiles-hooks
Last synced: 7 days ago
JSON representation
D-Bus listener to run custom hooks with power-profiles-daemon switching events
- Host: GitHub
- URL: https://github.com/thesola10/power-profiles-hooks
- Owner: Thesola10
- License: cc0-1.0
- Created: 2023-10-18T20:24:03.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-16T21:34:05.000Z (11 months ago)
- Last Synced: 2024-10-10T19:13:16.282Z (28 days ago)
- Language: Python
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Add hooks to `power-profiles-daemon` profiles
I developed this quick script to help save power by shutting down most P-cores on my laptop, as well as disabling [bees](https://github.com/Zygo/bees) in powersave and performance modes.
Support for CPU hotplugging was dropped due to issues with profile locks. Plan your hooks accordingly.
## Install
On Arch Linux, install the [`power-profiles-hooks-git`](https://aur.archlinux.org/packages/power-profiles-hooks-git) package from AUR.
Otherwise, run `make install` after cloning this repository.
## Hooks
This script scans for hooks in the following directories:
- `/etc/power-profiles.d/`
- `/usr/local/etc/power-profiles.d/`In the hooks directory, three subdirs are expected to exist, and all scripts within the directory of the same name as the power profile being applied are run.
This means that, if you wish to run a command when `power-saver` mode is active, you must place it in `/etc/power-profiles.d/power-saver/00-my-script.sh` (or `/usr/local/etc/...` if applicable).