Problem when matching windows with changed instance

asked 2014-07-10 13:36:19 +0000

Jean-Michaël Celerier gravatar image

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" to WM_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

edit retag flag offensive close merge delete

Comments

Have you tried "i3-msg -t get_tree"? there you can see what properties are set on each client.

tigrezno gravatar imagetigrezno ( 2014-07-10 16:06:48 +0000 )edit

In addition to the previous comment, perhaps `i3-dump-log` (see http://i3wm.org/docs/debugging.html) will be helpful.

Michael gravatar imageMichael ( 2014-07-11 18:08:16 +0000 )edit

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

TonyC gravatar imageTonyC ( 2014-07-11 22:31:08 +0000 )edit