File: get_models.py

package info (click to toggle)
python-xklavier 0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch, wheezy
  • size: 1,348 kB
  • ctags: 130
  • sloc: sh: 10,147; python: 85; makefile: 53; ansic: 17
file content (19 lines) | stat: -rw-r--r-- 578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
#
# I, Sayamindu Dasgupta <sayamindu@laptop.org, am the original author of 
# this work.  I hereby donate it into the public domain, and relinquish any 
# rights I may have in it.

import xklavier
import gtk

def print_model(c_reg, item):
    print ('\n%s (%s)' % (item.get_description(), item.get_name()))
    #c_reg.foreach_layout_variant(item.get_name(), print_variant)
    
display = gtk.gdk.display_get_default()
engine = xklavier.Engine(display)
configreg = xklavier.ConfigRegistry(engine)

configreg.load(False)
configreg.foreach_model(print_model)