Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import time, tkinter
mode = "flash"
color = "white"
f = open("/sys/devices/platform/clevo_xsm_wmi/kb_color", "w")

#try to set the kb color to white, error if impossible
try:
f = open("/sys/devices/platform/clevo_xsm_wmi/kb_color", "w")
f.write("white")
f.close()
print("sucessfully test set keyboard color")

except:
print("could not set keyboard color; make sure the prequisites are installed and you have write access to /sys/devices/platform/clevo_xsm_wmi/kb_color")

def setColor(passedColor):
mode = "static"
f = open("/sys/devices/platform/clevo_xsm_wmi/kb_color", "w")
f.write(passedColor)
f.close()
print("sucessfully set keyboard color to " + passedColor)

def flash(delay):
Expand Down Expand Up @@ -57,4 +54,6 @@ def flash(delay):
btnMagenta.pack()
#btnFlash.pack()

window.mainloop()
window.mainloop()

f.close()