- English (default)
- Portuguese (Brazil)
Lightweight CLI tool for adjusting screen brightness in Wayland environments using gammastep, with state persistence and safety limits.
Designed for minimal Wayland environments (e.g. Sway) where there is no simple native terminal-based brightness control.
Goal: predictable brightness control via CLI and keyboard shortcuts, without relying on full desktop environments.
- Incremental control (
up/down) - Direct value setting (
set) - Current value query (
get) - Local state persistence
- Safety limits (clamping)
- Direct integration with Sway keybindings
bashbcgammastep- Wayland session
git clone https://github.com/nikorvich/wl-bright.git
cd wl-bright
bash install.shInstalls the wl-bright command to:
~/.local/binwl-bright up
wl-bright down
wl-bright set 0.80
wl-bright get
wl-bright --help
wl-bright --versionbindsym $mod+F1 exec wl-bright down
bindsym $mod+F2 exec wl-bright up-
Brightness value is always saved locally, even if
gammastepis unavailable -
If
gammastepis missing:-
value is persisted
-
application is skipped with warning
-
gammastep:
-
does not control physical backlight
-
applies gamma correction (visual effect only)
-
may introduce artifacts at low brightness levels
Wayland (especially with Sway) does not provide a consistent interface for hardware brightness control across devices.
Attempts using:
-
/sys/class/backlight -
DDC/CI
were rejected due to:
-
hardware inconsistency
-
lack of reliability
-
unnecessary complexity for this use case
Decision:
use
gammastepas a practical and predictable solution
| Parameter | Value | Description |
|---|---|---|
| DEFAULT | 0.70 | Initial brightness |
| STEP | 0.05 | Increment step |
| MIN | 0.10 | Minimum limit |
| MAX | 1.00 | Maximum limit |
nikorvich
https://github.com/nikorvich