Skip to content

Instantly share code, notes, and snippets.

@zdienos
Created August 18, 2018 08:34
Show Gist options
  • Save zdienos/53bd90f01ae6fa1f6db4dd135ed7df8d to your computer and use it in GitHub Desktop.
Save zdienos/53bd90f01ae6fa1f6db4dd135ed7df8d to your computer and use it in GitHub Desktop.
Set Kecerahan Layar (Brightness) menggunakan script
#!/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
@zdienos
Copy link
Author

zdienos commented Aug 18, 2018

Penggunaan

Untuk lebih terang

./set_layar.sh + LVDS1

Untuk lebih gelap

./set_layar.sh + LVDS1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment