|Lucien Cartier-Tilet 259afcf567||1 month ago|
|src||1 month ago|
|.gitignore||1 month ago|
|Cargo.lock||1 month ago|
|Cargo.toml||1 month ago|
|LICENSE||1 month ago|
|PKGBUILD||1 month ago|
|README.org||1 month ago|
The Pumo Power Manager (PumoPM for short) is a custom power manager I wrote for myself in order to have a lightweight one that does exactly what I want, how I want. Basically: I want to be informed of a low level of battery (I consider 25% to be low, hence the defaults), very low (again, my preference is at 15%), and then at critical level (10%) I want the computer to automatically sleep, and if it stays asleep for a certain duration it will be suspended.
This project is written for a GNU/Linux operating system running with systemd. I have currently no plan on making it available on other platforms, except maybe one day with Guix (if you don’t value your time, take a look at it, it’s an awesome operating system, much better than NixOS in my opinion).
It’s my cat’s name.
This is a joke that originated from r/ProgrammerAnimemes when news were about
defaulting to another name than
master for git’s main branch. As a joke,
senpai on this reddit as an alternative to
here we are. This is a weeb’s joke.
To run the project, you currently only have one option: download the project’s
source code, compile it, and run it. You will need to have Rust installed.
Update your Rust installation if needed with
rustup update. Then, simply
begin with a
git clone, then cd into the project’s directory. You can then
build the project with
cargo, and even install it locally if you want to.
$ git clone https://labs.phundrak.com/phundrak/pumopm $ cd pumopm $ cargo build --release $ cargo run --release # to run the project $ cargo install --path . # optional, to install for the user the project
If you are an Arch Linux user, make sure you have
rustup installed, and then
you can install PumoPM using the
PKGBUILD available in the repository. To do
so, simply run
$ makepkg -si
You will then have PumoPM installed as a native package on your machine which you can uninstall using Pacman.
It is possible to run PumoPM with a couple of different flags. You will find their description here:
displays a help message
displays the program’s version
level at which the battery is considered to be low
level at which the battery is considered to be very low
level at which the battery is considered to be critical
refresh rate of the battery’s reads
augment the program’s verbosity, can be repeated
-c accept an integer between 5 and 95 (actually
any value that will fit in an unsigned byte, but it will be rounded up to 5 or
down to 95), while
-r accepts any integer that can fit in a
I’m sure you’ll never need that long of a refresh time.
The levels will also see their values ordered. If the
-L value is higher
-l, then the program will automatically set it to one percent lower, or
to 5% (whichever is higher). Same goes for the value of
-c if it goes over
-L value, including after the re-evaluation of the latter’s value. For
instance, calling the program like so
$ pumopm -l 30 -L 32 -c 30
is the same as calling it like so
$ pumopm -l 30 -L 29 -c 28
close the program with the exit code
This project is under the GPL-3.0 or later license. You can read it here, but basically, the following are allowed:
Commercial use of this program and its source code
Modification of the program and the source code
Distribution of the program and the source code
Patent use of the program and the source code
Private use of the program and the source code
However, this program comes with no warranty and I am under no liability for what you do with it. The conditions of using this program are:
Notice your users of the license and copyright
State any changes in the code
Disclose the source code
Use the same license
Please note that I am no lawyer, and the only legal document you can read is the one linked above.