Skip to content

Instantly share code, notes, and snippets.

@rixx
Created January 9, 2014 12:13
Show Gist options
  • Save rixx/8333191 to your computer and use it in GitHub Desktop.
Save rixx/8333191 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
import subprocess
def switch():
if "nodeadkeys" in subprocess.check_output(["setxkbmap", "-query"]):
os.system("setxkbmap de neo -option")
else:
os.system("setxkbmap de nodeadkeys -option")
if __name__ == "__main__":
switch()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment