Instant, context-aware brightness control for Hyprland.
Seamlessly controls both Laptop Backlights and External Monitors (DDC/CI) using the same keybindings, with zero perceived latency.
- ๐ Extreme Optimization: Reduces
ddcutillatency from ~500ms to ~20ms using bus caching and optimized flags. - ๐ป Laptop Support: Native kernel control for
eDP/LCDscreens. - ๐ฅ๏ธ Desktop Support: Full DDC/CI control for external displays.
- ๐ฏ Smart Rounding: Automatically rounds brightness to the nearest step multiple (e.g., 17% -> 20%).
- ๐งน Auto-Config: Includes built-in install/uninstall commands to manage your Hyprland config cleanly.
The script will automatically check for these during installation:
- hyprland: Required for monitor detection.
- jq: Required for parsing monitor data.
- ddcutil: Required for external monitor support.
- brightnessctl: Required for laptop backlight support.
- swayosd: Recommended for the On-Screen Display (OSD) feedback.
This keeps the script in your ~/Repos folder and links it.
-
Clone the repository:
git clone https://github.com/nlabrad/hypr-smart-brightness.git cd hypr-smart-brightness -
Run the installer:
./hypr-smart-brightness --install
This will add a
source = ...line to yourhyprland.confpointing to the config file in this directory.
If you copy the script to /usr/local/bin, make sure to also copy hypr-smart-brightness.conf to /usr/share/hypr-smart-brightness/.
To cleanly remove the configuration edits:
./hypr-smart-brightness --uninstallThen you can safely delete the repository folder.
The script uses a sourced configuration file (hypr-smart-brightness.conf) to avoid cluttering your main config. It handles:
- Unbinding default keys (to avoid double-events).
- Binding standard keys (Step 5).
- Binding Alt+Keys (Step 1 for precise control).
You can edit hypr-smart-brightness.conf directly to change keys or step sizes.
MIT