Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Keyboard layout widget
- kbdwidget = widget({type = "textbox", name = "kbdwidget"})
- kbdwidget.border_width = 1
- kbdwidget.border_color = beautiful.fg_normal
- kbdwidget.text = " Eng "
- dbus.request_name("session", "ru.gentoo.kbdd")
- dbus.add_match("session", "interface='ru.gentoo.kbdd',member='layoutChanged'")
- dbus.add_signal("ru.gentoo.kbdd", function(...)
- local data = {...}
- local layout = data[2]
- lts = {[0] = "Eng", [1] = "Рус"}
- kbdwidget.text = " "..lts[layout].." "
- end
- )
Add Comment
Please, Sign In to add comment