The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

negated command (for_window) [closed]

asked 2013-05-23 10:18:12 +0000

cee gravatar image

I am trying to make a tool-window (and splash screen) floating with for_window, but want the main window to act normal (non floating). The application is DDD (Data Display Debugger).

for_window [class="Ddd"] floating enable
does work. Is it possible to append something like:

Note the ! before =, to negate the instance.

What I try to achieve in words: Make all windows with class="Ddd" floating, EXCEPT where instance="command_shell".

PS: I have got the proper definition with xprop -spy.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by joepd
close date 2013-05-24 04:59:20.178986


joepd gravatar imagejoepd ( 2013-05-24 04:59:12 +0000 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-05-23 13:37:09 +0000

The i3 documentation for command criteria states that arbitrary regular expressions can be used. I am no expert in regex, but I think you should be able to build something that fits your needs.

edit flag offensive delete link more

answered 2013-05-23 13:57:27 +0000

cee gravatar image

Thank you.
I am no expert at Regex as well. It seems, that (?!something) would match, if something is not found.

It does not work for me yet.
To me it's still unclear if this regex would work, if it is supported in i3 and if the syntax in my conf file is correct.

For now I have it like this: for_window [class="Ddd" instance="tool"] floating enabled

This of course does not work for the splash screen, but the most important thing is, that the tool window is floating.

If anybody can enlighten me, I would be very happy. But I can live with this solution. (Still bugs me a little to not have the perfect solution, though)

edit flag offensive delete link more

Question Tools


Asked: 2013-05-23 10:18:12 +0000

Seen: 208 times

Last updated: May 23 '13