there is a generic tool for the mesa drivers (intel, amdgpu, radeon, noveau)
https://archlinux.org/packages/extra/x86_64/adriconf/
not sure if that suits your needs and wishes, I never had the urge to configure anything once I went AMD free driver only (all I want to configure can be done in KDE’s display settings)
KDE also lets you configure the default brightness in each power-mode, not sure if something like that exists for i3 or if you would need a script for that.
edit: here is what ChatGPT suggests for a script based solution, I have no hands on experience with i3 and this is a simple copy&paste of what ChatGPT suggests - but from the comments and explanations, I would suggest that something like automatic brightness control exists in i3 and therefore should be possible to be configured:
Summary
Sure, creating a script to set the default brightness mode for the display on an i3 desktop involves using tools that can control display settings. One common tool for this purpose is xrandr
for X Window System. Additionally, you might need a command to control the brightness, which could be different depending on your hardware.
Here’s a basic example assuming you have xrandr
and xbacklight
installed. Please note that the commands might vary based on your system and hardware.
#!/bin/bash
# Set the default brightness mode to manual
xrandr --output <your-display-name> --brightness 1.0
# Set the brightness level (adjust the value as needed)
xbacklight -set 50
Replace <your-display-name>
with the actual name of your display. You can find the display name by running the xrandr
command without any arguments.
Make the script executable:
chmod +x set_brightness.sh
You can then run this script to set the default brightness mode. To make it automatically run when i3 starts, you can add it to your i3 configuration file (~/.config/i3/config
):
exec --no-startup-id /path/to/set_brightness.sh
Replace /path/to/set_brightness.sh
with the actual path to your script.
Keep in mind that the effectiveness of this script may depend on your hardware and the utilities available on your system. If xbacklight
doesn’t work for you, you might need to explore other tools specific to your hardware.
Always test such scripts to ensure they work as expected on your system before relying on them for regular use.