A brightness controller for external (DDC/CI) and internal (backlight) displays, written in Rust with GTK4/Libadwaita GUI.
Based on Luminance by sidevesh — rewritten from scratch with FFI-based DDC for performance and a testable architecture.
- GUI — per-display brightness sliders with live hardware control
- CLI — get/set/increase/decrease brightness from the command line
- JSON output —
temperlux list --jsonfor scripting/waybar/polybar - Sync modes — Off, Same Value, or Proportional across all displays
- Min/Max caps — per-display brightness range limits
- Display rename — custom names persisted in config
- Autostart — optional "Start on login" via Preferences
- Error auto-expiry — error messages auto-clear after 5 seconds
# Install dependencies
sudo apt install ddcutil libddcutil-dev libgtk-4-dev libadwaita-1-dev pkg-config
# Build and install (CLI + GUI)
make && sudo make installThis installs:
temperlux(CLI) →/usr/local/bin/temperlux-gui(GUI) →/usr/local/bin/- Desktop entry →
/usr/local/share/applications/ - App icon →
/usr/local/share/icons/hicolor/
# CLI only (no GUI)
cargo install temperlux
# With GUI
cargo install temperlux --features guisudo make uninstalltemperlux-gui# List all displays
temperlux list
# JSON output for scripting
temperlux list --json
# Get brightness of display 1
temperlux get 1
# Set display 1 to 75%
temperlux set 1 --percent 75
# Set all displays to 50%
temperlux set --percent 50
# Increase all displays by 10%
temperlux increase --percent 10
# Rename a display
temperlux rename 1 "Left Monitor"# Bash
temperlux completions bash > ~/.local/share/bash-completion/completions/temperlux
# Zsh
temperlux completions zsh > ~/.zfunc/_temperlux
# Fish
temperlux completions fish > ~/.config/fish/completions/temperlux.fish# CLI only (default)
cargo build --release
# With GUI
cargo build --release --features gui
# Run tests
cargo test- Rust 1.82+
libddcutildevelopment headers- GTK4 + Libadwaita 1.2+ (for GUI feature)
sudo apt install ddcutil libddcutil-dev libgtk-4-dev libadwaita-1-dev pkg-configsrc/
main.rs CLI entry point
cli.rs clap argument definitions + shell completions
autostart.rs Autostart .desktop file management
lib.rs Library root
settings.rs JSON config (~/.config/temperlux/settings.json)
sync.rs Sync mode math (proportional map, delta apply)
caps.rs Min/max brightness clamping
display/
ddc_ffi.rs DdcService (FFI libddcutil, parallel writes, command coalescing)
backlight.rs RealBacklightProvider (/sys/class/backlight)
manager.rs DisplayManager (unified display operations)
provider.rs BacklightProvider trait
gui/
window.rs Main window, display rows, dialogs
viewmodel.rs DisplayRow data model
debounce.rs Slider debouncing + worker pool
Both CLI and GUI use DdcService (FFI libddcutil) for reliable display detection and fast parallel DDC writes with command coalescing. Hardware access is behind provider traits with mock implementations for testing.
Config file: ~/.config/temperlux/settings.json
{
"sync_mode": "Proportional",
"show_display_numbers": true,
"autostart": false,
"display_order": ["ddc:2", "ddc:1", "ddc:3"],
"displays": {
"ddc:1": {
"min_brightness": 20.0,
"max_brightness": 80.0,
"custom_name": "Left Monitor"
},
"ddc:2": {
"min_brightness": 0.0,
"max_brightness": 100.0,
"custom_name": "Right Monitor"
}
}
}GPL-3.0-or-later. See LICENSE and NOTICE.
This project is a rewrite of Luminance by sidevesh, which is also licensed under GPL-3.0-or-later.
