simple brightness tool
- C 82.7%
- Nix 9%
- Roff 4.2%
- Makefile 4.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| .gitignore | ||
| backlight.rules | ||
| flake.nix | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| sb.1 | ||
| sb.c | ||
sb
A simple brightness control for internal and external monitors
Usage
sb <output> <raise|lower|get> [step]
output is the DRM connector name: eDP-1, HDMI-A-1, DP-2, and so on.
step is a brightness percentage, defaulting to 5 if you can't be bothered to
specify one.
sb eDP-1 raise # internal panel, +5%
sb HDMI-A-1 lower 10 # external monitor, -10%
sb DP-2 get # current brightness percentage
raise and lower print the resulting brightness percentage to stdout, so
callers can read the new value without a separate get call.
Building
make
make LDFLAGS="-static" # statically links the binary
make install # installs to /usr/local/bin by default
(Requires make and a C compiler)
External monitor permissions
Your user needs access to /dev/i2c-*. Add yourself to the i2c group:
# Linux (most distros)
usermod -aG i2c $USER
Without this, sb will report cannot open /dev/i2c-N: Permission denied
License
CDDL Version 1.1