Skip to content

Instantly share code, notes, and snippets.

@pablopalacios
Created December 13, 2018 22:55
Show Gist options
  • Save pablopalacios/81fc221d5ef2dfd168580ecf78685afc to your computer and use it in GitHub Desktop.
Save pablopalacios/81fc221d5ef2dfd168580ecf78685afc to your computer and use it in GitHub Desktop.
Script to set laptop monitor brightness
#!/usr/bin/bash
if ! [[ $1 =~ ^[0-8]$ ]] ; then
echo 'you must provide a number between 0 and 8 as argument'
exit 1
fi
echo $1 | sudo tee /sys/class/backlight/acpi_video0/brightness > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment