Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hspak/brightnessztl
A CLI to control device backlight
https://github.com/hspak/brightnessztl
brightnessctl brightnessztl
Last synced: 2 months ago
JSON representation
A CLI to control device backlight
- Host: GitHub
- URL: https://github.com/hspak/brightnessztl
- Owner: hspak
- License: mit
- Created: 2019-08-25T03:43:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T16:45:49.000Z (6 months ago)
- Last Synced: 2024-08-03T23:21:16.569Z (6 months ago)
- Topics: brightnessctl, brightnessztl
- Language: Zig
- Size: 43.9 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - hspak/brightnessztl
README
# Brightnessztl
A CLI to control device backlight. It defaults to the `intel_backlight` class.## Setup
```sh
# development tracks the latest stable zig release (0.13.0)
zig build
```## Usage
```
brightnessztl [action-options]Actions:
get: Display current brightness
set: Update the brightness
debug: Display backlight information
help: Display thisSet options:
X: Increase brightness to X%
+X: Increase brightness by X%
-X: Decrease brightness by X%
max: Set brightness to maximum
min: Set brightness to minimum
```By default, `brightnessztl` now links in `libsystemd` to leverage the D-Bus C
API to allow setting backlight values without root permissions or udev rules.
(h/t https://github.com/joachimschmidt557)To disable this behavior, you can build via `zig build -Dlogind=false`.
`brightnessztl` will require either root access or the following udev rules to
run:```
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
```## Install
Available on Arch Linux via [AUR](https://aur.archlinux.org/packages/brightnessztl/)## License
MIT