Skip to content

Instantly share code, notes, and snippets.

@ardianta
Last active September 25, 2015 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ardianta/7e9e2a5497684e3d3279 to your computer and use it in GitHub Desktop.
Save ardianta/7e9e2a5497684e3d3279 to your computer and use it in GitHub Desktop.
Kurangi cahaya layar laptop (Kali Linux)
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