Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateomor/brightness-control
A simple script to adjust the brightness of your screen on Linux using xrandr
https://github.com/mateomor/brightness-control
bash-script brightness-control linux xrandr
Last synced: 12 days ago
JSON representation
A simple script to adjust the brightness of your screen on Linux using xrandr
- Host: GitHub
- URL: https://github.com/mateomor/brightness-control
- Owner: MateoMor
- License: mit
- Created: 2024-08-24T18:38:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T18:46:27.000Z (3 months ago)
- Last Synced: 2024-10-31T10:05:01.923Z (12 days ago)
- Topics: bash-script, brightness-control, linux, xrandr
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```
# Brightness ControlA simple script to adjust the brightness of your screen on Linux using `xrandr`.
## How to Use
### 1. Download and Setup
1. Clone the repository to your local machine:
```bash
git clone https://github.com/MateoMor/brightness-control.git
```2. Navigate to the `brightness-control` directory:
```bash
cd brightness-control
```3. Make the script executable:
```bash
chmod +x brightness-control.sh
```### 2. Running the Script
To adjust the brightness, run the script with a value between 0 and 1. Positive values increase brightness, while negative values decrease it.
```bash
./brightness-control.sh 0.1 # Increase brightness by 0.1
./brightness-control.sh -0.1 # Decrease brightness by 0.1
```### 3. Add to Shortcuts (Manual Setup)
You can assign this script to a keyboard shortcut for easier access.
#### On GNOME (or similar desktop environments):
1. Open **Settings** and navigate to **Keyboard Shortcuts**.
2. Scroll down and click **Custom Shortcuts** (or similar).
3. Click **Add Custom Shortcut**.
4. Set the **Name** to `Increase Brightness` or `Decrease Brightness`.
5. Set the **Command** to the full path of the script with the desired argument, for example:
- Increase: `/full/path/to/brightness-control/brightness-control.sh 0.1`
- Decrease: `/full/path/to/brightness-control/brightness-control.sh -0.1`6. Assign your preferred key combination (e.g., `Ctrl+Up` for increasing brightness and `Ctrl+Down` for decreasing brightness).
7. Save and close the settings.
### 4. Example Commands
- **Increase brightness by 0.1:**
```bash
./brightness-control.sh 0.1
```- **Decrease brightness by 0.1:**
```bash
./brightness-control.sh -0.1
```### 5. Uninstallation
To remove the script, simply delete the `brightness-control` directory:
```bash
rm -rf /path/to/brightness-control
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
```