Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

A simple cli battery percent notifier in Rust.

Notifications You must be signed in to change notification settings

legremz/rusty-battery-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusty-battery-notifier

A simple cli battery percent notifier in Rust. Useful for wm such as i3.

Why Rust?

  • "Rust btw."

Installation

Clone the respository:

git clone git@github.com:NicolasGB/rusty-battery-notifier.git

Then build the binary with cargo:

cd rusty-battery-notifier
cargo build --release

Finally copy the generated binary to somewhere you want. For example in your i3 config directory.

cp target/release/rusty-battery-notifier ~/.config/i3/battery-notify

Usage

The binary accepts 3 different flags, you can display them with the --help flag.

Flag Description Default
-f The first threshold to notify at. (%) 15
-s The second threshold to notify at. (%) 5
-i The interval to check the battery at. (minutes) 5

i3

Add the following for your config with your desired values.

exec --no-startup-id ~/.config/i3/battery-notify -f 20 -s 10 -i 3

Recommendation

Use a Nerd Font to view the icons in the alert.

License

This project is licensed under the MIT license

About

A simple cli battery percent notifier in Rust.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%