Created
April 25, 2018 12:42
-
-
Save mikerr/e3cd020e8f9ef42ae3661da429fd0ae5 to your computer and use it in GitHub Desktop.
set brightness with gui
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
from Tkinter import * | |
from subprocess import * | |
app=Tk() | |
slider=Scale(app,orient=HORIZONTAL) | |
slider.set(50) | |
slider.pack() | |
def pressed(): | |
value = slider.get() | |
call("xbacklight -set " + str(value),shell=TRUE) | |
button=Button(app,text="Set brightness",command=pressed) | |
button.pack() | |
mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment