Skip to content

Instantly share code, notes, and snippets.

@andrelugomes
Last active July 28, 2020 12:09
Show Gist options
  • Save andrelugomes/2d6f4d297e981da8b82f005164c95021 to your computer and use it in GitHub Desktop.
Save andrelugomes/2d6f4d297e981da8b82f005164c95021 to your computer and use it in GitHub Desktop.
My Brightness Controll
#! /bin/zsh
VALUE=$1
if [[ "$VALUE" -ge 0.25 && "$VALUE" -le 1.0 ]]; then
xrandr | grep " connected" | cut -f1 -d " " | xargs -I DISPLAY xrandr --output DISPLAY --brightness $VALUE
else
echo "Value needs to be between 0 and 1"
fi
#sudo mv brightness.sh /usr/local/bin/brightness
#sudo chmod +x /usr/local/bin/brightness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment