Yes, the "terminal" role is a-okay.  For example

for_window [window_role="terminal"]  border pixel 22

works fine.  And the dbus-send command also works if it's run from the
terminal.  But
if I start a new terminal with $mod+Enter, it comes up with the wrong
layout.

For testing, I did this (the same dbus-send command bound to $mod+o):

bindsym $mod+o exec --no-startup-id dbus-send --dest=ru.gentoo.KbddService
/ru/gentoo/KbddService ru.gentoo.kbdd.set_layout uint32:1

and pressing $mod+o in the new terminal changes the layout to US, as I
expected.

My guess is that the switching to the US layout happens too early.  Maybe
kbdd kicks in on the
new window just a bit after the US layout was set and kbdd overwrites it
with the default.


This didn't work either:

xte 'keydown Shift_L' 'keydown Caps_Lock' 'keyup Caps_Lock' 'keyup Shift_L'

but this one (that sleeps 0.5 sec before simulating the keypresses) did:

xte 'usleep 500000' 'keydown Shift_L' 'keydown Caps_Lock' 'keyup Caps_Lock'
'keyup Shift_L'

So, this seems to be some stupied timing issue.  I'm sorry about
bothering...

Uz.


On Tue, Sep 1, 2015 at 5:23 PM, Ingo Bürk <ad...@airblader.de> wrote:

> Then I think it should work, assuming your terminal actually has the
> window role "terminal".
>
> Can you be more specific on how it doesn't work? Can you figure out if the
> command is run on the wrong window? Also, a log file would be helpful to
> see how the command is being executed.
>
> You probably also want to add --no-startup-id to the exec call. I doubt
> dbus-send does anything with startup notifications.
>
> Regards
> Ingo
>
> Sent from TypeMail <http://www.typeapp.com/r>
>
> On Sep 1, 2015, at 17:19, Nokan Emiro <uzleep...@gmail.com> wrote:
>>
>> That's not a problem.  If the layout is once set for that particular
>> window,  kbdd will
>> take care of the focus changes and activate the proper layout if the
>> focus moves.  All
>> I want is to set the initial layout to US on the terminal windows and
>> leave the other
>> layout as the default for all the rest.
>>
>>
>> On Tue, Sep 1, 2015 at 5:13 PM, Ingo Bürk <ad...@airblader.de> wrote:
>>
>>> For_window will only be run when the window is opened, not everytime it
>>> is focused.
>>>
>>

Reply via email to