Skip to content

Instantly share code, notes, and snippets.

@lifeofcoding
Created July 2, 2020 21:18
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 lifeofcoding/8aef10b1b34fe5eea83d588e5a4ea84f to your computer and use it in GitHub Desktop.
Save lifeofcoding/8aef10b1b34fe5eea83d588e5a4ea84f to your computer and use it in GitHub Desktop.
Change brightness via command line
#!/bin/bash
# ./change-brghtness.sh 60
newVal=$(printf "%3.2f\n" $(echo "scale=2; $1 / 100" | bc))
sudo ./display-first-instance.sh | xargs -I{} xrandr --output {} --brightness "$newVal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment