Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Junker/stumpwm-battery
Battery information module for StumpWM
https://github.com/Junker/stumpwm-battery
battery battery-monitor battery-status stumpwm
Last synced: 3 months ago
JSON representation
Battery information module for StumpWM
- Host: GitHub
- URL: https://github.com/Junker/stumpwm-battery
- Owner: Junker
- Created: 2024-01-10T05:29:08.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-02-15T11:07:48.000Z (9 months ago)
- Last Synced: 2024-06-12T00:09:41.312Z (5 months ago)
- Topics: battery, battery-monitor, battery-status, stumpwm
- Language: Common Lisp
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-stumpwm - battery - Battery information module for StumpWM (Modules)
README
# StumpWM Battery
Battery information module for StumpWM
## Requirements
- [trivial-battery](https://github.com/pokepay/trivial-battery) package installed
## Installation
```bash
cd ~/.stumpwm.d/modules/
git clone https://github.com/Junker/stumpwm-battery battery
```
`
```common-lisp
;; (ql:quickload "trivial-battery")
(stumpwm:add-to-load-path "~/.stumpwm.d/modules/battery")
(load-module "battery")
```## Usage
```common-lisp
(setf battery:*notify-levels* '((10 . :critical)
(30 . :warning)
(45 . :warning)))
(battery:init)
```### Commands
- `battery-status`
### Parameters
- `battery:*check-interval*` - Interval in seconds for battery check (Default: 15).
- `battery:*notify-levels*` - List of notification levels. Set it to NIL to disable notifications.
- `battery:*percentage*` - Current battery percentage.
- `battery:*chargingp*` - Current battery charging status.## Modeline
`%B` - battery formatter
### Parameters for modeline
- `battery:*modeline-fmt*` - format of battery modeline (default: "%c %b")
- `%c` - battery charging status ("+/-")
- `%b` - battery percentage