[solved] URxvt i3 workspaces

Hi all,
I search in vain for a solution to redirect instances of URxvt to different workspaces, I specify that I launch URxvt as daemon (urxvtd -q -o -f), I run that “fcker” like this: Mod + Return

assign [class = “(? i) (?: URxvt)”] → $WS6

But I want it to go to ‘→ $WS7’ when I run ranger, by binding

bindsym $Mod+Ctr+r --no-startup-id urxvtc -e ranger

I tried this solution:

assign [class="^URxvt$“instance=”^ranger $"] → $WS7

but that fcker won’t do so and goes alway on workspace 6. What’s wrong into the syntax ?
I know that AL config is a bit diffent compare to official i3wm.

I think you have to name it as well:

bindsym $Mod+Ctr+r --no-startup-id urxvtc -e ranger -name ranger

Reference: https://i3wm.org/docs/userguide.html#assign_workspace


nop, still working on my problem… I have read i3 site before and I think the AL config syntax is different and kind of confict a little. Where are the devs lol :relaxed:

I think it might be because you’re running the client and it takes the name from the daemon.

Does it work if you try a non-client version?

@Head_on_a_Stick Sorry to say but I have tried other terminals and same result at the moment.

The problem is you’re using class and instance while trying to set the title.

Also you might be relying on setting the terminal title while the shell or ranger is overriding it?

Can confirm doing something like this works

# i3 config
assign [class="ranger“] → $WS7

# open it
st -c ranger -e ranger

# other terminal
termite --clase=ranger --exec=ranger

# same result cause I'm not telling it about the terminal,
# it only cares if it has the class 'ranger'
# urxvt doesn't seem to support setting the class even though it uses it
# so we need to use the instance

assign [instance="ranger“] → $WS7

urxvt -name ranger -e ranger

If you wanna stick with urxvt then I suggest opening an instance of it how you intend, checking it’s info with xprop and go from there.

Also note, ranger itself will change the terminal title if you have it configured to do so
all of this is very hacky to say the least and you can end up with windows moving around on you while using them.

I prefer to avoid window rules all together and just open them where I want them.

The AL configs don’t use any special configuration syntax, just a bit better regex matches and the standard settings from the gaps branch.

assign [class="(?i)(?:thunar)"]  → $WS3

is just a non-capturing, case-insensitive, regex match (standard perl style regex). it allows matching anything to WS3 in this case by just adding another match and you don’t need to worry about case or whether it matches the exact title/class/whatever

assign [class="(?i)(?:thunar|gimp|urxvt)"]  → $WS3

ok guys I’ ll try to fix my issue with these tips which is a way anyhow and come back to report .


Ok guys I managed by doing this as far as I still use URxvt daemon:

bindsym $Mod+Ctrl+r exec --no-startup-id urxvtc -name ranger_instance -e ranger
bindsym $Mod+Ctrl+h exec --no-startup-id urxvtc -name htop_instance -e htop

assign [instance=“ranger_instance”] → $WS6
assign [instance=“htop_instance”] → $WS7

It’s works for me now. :wink:

Glad that you finally sorted it out @archus