Last active
September 25, 2015 09:53
-
-
Save ardianta/7e9e2a5497684e3d3279 to your computer and use it in GitHub Desktop.
Kurangi cahaya layar laptop (Kali Linux)
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
import os | |
cahaya = open('/sys/class/backlight/intel_backlight/brightness') | |
maxCahaya = open('/sys/class/backlight/intel_backlight/max_brightness') | |
minCahaya = int(maxCahaya.readline()) / 14 | |
kurangCahaya = int(cahaya.readline()) - minCahaya | |
if(kurangCahaya > minCahaya): | |
os.system('echo '+str(kurangCahaya)+' > /sys/class/backlight/intel_backlight/brightness') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment