Description • Requirements • Usage • Reason for Creation • Notes
This is a simple Python script for controlling the brightness of a primary display in Linux using an AppIndicator. It allows users to adjust the brightness of their primary display through a dropdown menu in the system tray.
- Python 3.x
- Gtk3
- AppIndicator3
-
Download: Download the zip file from the latest release of the repository.
-
Extract: Extract the contents of the zip file.
-
Navigate: Navigate to the extracted folder.
-
Copy Files: Copy the files to
/home/[username]/.config/autostart/
directoryNote: Replace
[username]
with your actual username. -
Edit Desktop File: Open the
brightness-controller.desktop
file in a text editor and modify theExec
line to point to the correct path ofbrightness-script.py
. For example:Exec=python3 /home/[username]/.config/autostart/brightness-script.py
-
Save Changes: Save the changes to
brightness-controller.desktop
. -
Auto-Start: Now, the brightness controller script will automatically run on startup.
This setup ensures that the brightness controller script runs automatically every time you log in. Adjustments to the brightness can be made through the dropdown menu in the system tray.
The reason for creating this script is that there is no built-in brightness controller in Ubuntu Unity System tray. While many desktop environments provide native brightness controls, Unity lacks this feature. This script fills that gap by providing a simple yet effective way to adjust display brightness directly from the system tray.
- This script assumes the usage of the
xrandr
command-line utility for adjusting display brightness. Ensure thatxrandr
is installed and available in your system's PATH. - This script may need to be run with elevated privileges to adjust display brightness, depending on your system configuration.
This project is licensed under the MIT License.
Feel free to contribute, report issues, or suggest improvements!