brightness-control is a simple Python application designed for GhostBSD to adjust screen brightness using the xrandr utility. It provides a lightweight graphical interface built with GTK4.
- Adjust brightness for individual displays.
- Automatically detects connected displays.
- Lightweight and optimized for GhostBSD.
Follow these steps to install and set up the application:
Ensure the following dependencies are installed on your GhostBSD system:
pythonpy311-pygobjectgtk4xrandr
-
Clone the Repository
Open a terminal and run:
git clone https://github.com/xcrsz/brightness-control.git cd brightness-control -
Install the Application
Run the following command to install dependencies, build the application, and install the binary:
make install
This will:
- Install the required system dependencies using
pkg. - Build a standalone executable using PyInstaller.
- Install the binary to
/usr/local/bin/.
- Install the required system dependencies using
Once installed, you can run the application from anywhere using:
brightness-control- Open the application by running
brightness-control. - Select a display (if multiple are connected).
- Use the slider or input field to set the desired brightness level.
To remove the installed binary from your system, run:
make uninstallThis will delete the brightness-control binary from /usr/local/bin.
If you want to modify the application or manually build it:
- Clone the repository:
git clone https://github.com/xcrsz/brightness-control.git cd brightness-control - Install dependencies:
make install
- Build the executable:
make build
The built executable will be located in the dist/ directory.
To remove build artifacts and the virtual environment:
make clean-
Brightness Changes Not Applied:
- Ensure your display supports brightness adjustments using
xrandr. - Verify the required drivers for your hardware are installed.
- Ensure your display supports brightness adjustments using
-
Missing Dependencies:
- Reinstall the required packages:
sudo pkg install python py311-pygobject gtk4 xrandr
- Reinstall the required packages:
-
Permission Issues:
- Run the application as a user with sufficient permissions to manage display settings.
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
Contributions are welcome! Please:
- Open an issue to report bugs or suggest features.
- Submit pull requests to improve the project.
- Built with Python, GTK4, and
xrandr. - Designed for GhostBSD users seeking a lightweight brightness control solution.