Created
August 18, 2018 08:34
-
-
Save zdienos/53bd90f01ae6fa1f6db4dd135ed7df8d to your computer and use it in GitHub Desktop.
Set Kecerahan Layar (Brightness) menggunakan script
This file contains 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
#!/bin/sh | |
CURRBRIGHT=$(xrandr --current --verbose | grep -m 1 'Brightness:' | cut -f2- -d:) | |
if [ "$1" = "+" ] && [ $(echo "$CURRBRIGHT < 1" | bc) -eq 1 ] | |
then | |
xrandr --output $2 --brightness $(echo "$CURRBRIGHT + 0.1" | bc) | |
elif [ "$1" = "-" ] && [ $(echo "$CURRBRIGHT > 0" | bc) -eq 1 ] | |
then | |
xrandr --output $2 --brightness $(echo "$CURRBRIGHT - 0.1" | bc) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Penggunaan
Untuk lebih terang
./set_layar.sh + LVDS1
Untuk lebih gelap
./set_layar.sh + LVDS1