Created
April 18, 2016 18:32
-
-
Save Nyubis/2620fadbe91c9bd79c73683fbcc41b65 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
from ctypes import * | |
from sys import argv | |
X11 = cdll.LoadLibrary("libX11.so.6") | |
display = X11.XOpenDisplay(None) | |
val = 0 if len(argv) < 2 or argv[1].lower() == "off" else 2 | |
X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(val)) | |
X11.XCloseDisplay(display) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment