Skip to content

Instantly share code, notes, and snippets.

@mikerr
Created April 25, 2018 12:42
Show Gist options
  • Save mikerr/e3cd020e8f9ef42ae3661da429fd0ae5 to your computer and use it in GitHub Desktop.
Save mikerr/e3cd020e8f9ef42ae3661da429fd0ae5 to your computer and use it in GitHub Desktop.
set brightness with gui
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