Created
January 31, 2017 02:29
-
-
Save fstamour/707e29c5ed4b197f1c5f4bf051d4c12d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
brightness_file=/sys/class/backlight/acpi_video0/actual_brightness | |
set_brightness () { | |
nvidia-settings -n -a BacklightBrightness=$(cat $brightness_file) > /dev/null | |
} | |
watch () { | |
inotifywait -m -e modify $brightness_file | | |
while read _; do | |
set_brightness | |
done | |
} | |
watch & | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment