For_window will only be run when the window is opened, not everytime it is 

What you need to do is hook into the focus event on the IPC, match the window 
there and execute the command. 


Sent from TypeMail

On Sep 1, 2015, 17:07, at 17:07, Nokan Emiro <> wrote:
>Hi i3wm gurus,
>I use i3 with kbdd in order to have different keyboard layouts in
>exec_always --no-startup-id kbdd
>exec_always setxkbmap -layout de,us -option grp:shift_caps_toggle
>I figured out that the following command changes the current layout
>the US version:
>$  dbus-send --dest=ru.gentoo.KbddService /ru/gentoo/KbddService
>ru.gentoo.kbdd.set_layout uint32:1
>...and replacing the uint32:1 with uint32:0 switches to the DE layout.
>Now, what I couldn't figure out is that how can I set up a default
>for certain types
>of windows.  New windows start with the DE version (I guess because
>one comes
>first in the list with the 'setxkbmap -layout de,us' command).  So far,
>go.  But on
>terminals I want to use the US layout.  I tried something like this in
>i3wm config:
>for_window [window_role="terminal"] exec dbus-send
>--dest=ru.gentoo.KbddService /ru/gentoo/KbddService
>ru.gentoo.kbdd.set_layout uint32:1
>Unfortunately this doesn't work.  Can you please tell me how can I do
>kind of
>setup from the i3 config?  (Maybe I could run the dbus-send command
>from the
>bash_profile or something like that, but I hope this can be done with
>in the i3 config somehow.)

Reply via email to