Problem when matching windows with changed instance
Hello,
I have the following script running when I press Mod4+Enter :
#!/bin/bash
i3-msg '[instance="nextURxvt"] move workspace current'
WINDOW_ID=`xwininfo -tree -root|grep nextURxvt|awk '{print $1;}'`
xprop -id $WINDOW_ID -f WM_CLASS 8ss -set WM_CLASS "urxvt"
i3-msg 'exec urxvtc -name nextURxvt'
What it does is :
- Pull the URxvt instance named nextURxvt from the scratchpad to the current workspace.
- Change its WM_CLASS from
WM_CLASS(STRING) = "nextURxvt", "URxvt"
toWM_CLASS(STRING) = "urxvt"
- Open a new urxvt in the scratchpad (the mapping is in my i3 config).
The problem is : when I do i3-msg '[instance="nextURxvt"] move workspace current'
, even the renamed URxvt's are moved to the current workspace, even though if I run xprop|grep nextURxvt
there is nothing.
What is wrong ? Thanks
Have you tried "i3-msg -t get_tree"? there you can see what properties are set on each client.
In addition to the previous comment, perhaps `i3-dump-log` (see http://i3wm.org/docs/debugging.html) will be helpful.
We cache class/instance when the window is managed and then it doesn't get updated afterwards. It's not hard to fix. See https://github.com/i3/i3/issues/1052