Skip to content

Instantly share code, notes, and snippets.

@barrientosvctor
Created March 24, 2024 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barrientosvctor/9b1f3615b5f892c9e4e3904d3cb76c2d to your computer and use it in GitHub Desktop.
Save barrientosvctor/9b1f3615b5f892c9e4e3904d3cb76c2d to your computer and use it in GitHub Desktop.
A brightness manager for Ubuntu-based distro Linux machines.
#!/bin/bash
read -p "Provide the brightness percentage you want to set: " PERCENTAGE
device=$(xrandr | grep " connected" | cut -f1 -d " ")
# sets the brightness to specified brightness percentage
xrandr --output $device --brightness $PERCENTAGE
echo "Brightness set to $PERCENTAGE%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment