I want to make all Pidgin windows start in a particular layout. So I do this:
client.connect_signal("manage", function(c, startup)
if c.class == "Pidgin" then
on_focus_change_language = function(cl)
cl:disconnect_signal("focus", on_focus_change_language)
os.execute("dbus-send --type=method_call --dest=ru.gentoo.KbddService /ru/gentoo/KbddService ru.gentoo.kbdd.set_layout uint32:1")
end
c:connect_signal("focus", on_focus_change_language)
end
end)
The idea is that the first time a Pidgin window is focused, the language will change. However, this doesn't work. The call to dbus-send is made, but the language doesn't change. If I do the call somewhere else (like in the manage signal) it works but a different window has it's language changed, because the Pidgin window is not focused.
The problem is obviously with calling dbus-send in the focus signal, but I can't see why. I tried putting sleep but it doesn't work. In dbus-monitor I see that a method call is invoked (and this is the only call to the kbdd service):
I want to make all Pidgin windows start in a particular layout. So I do this:
The idea is that the first time a Pidgin window is focused, the language will change. However, this doesn't work. The call to
dbus-send
is made, but the language doesn't change. If I do the call somewhere else (like in themanage
signal) it works but a different window has it's language changed, because the Pidgin window is not focused.The problem is obviously with calling
dbus-send
in thefocus
signal, but I can't see why. I tried putting sleep but it doesn't work. Indbus-monitor
I see that a method call is invoked (and this is the only call to the kbdd service):But no matter.
I use the latest
kbdd
frommaster
. Any ideas?