Discussion:
[i3-discuss] foreground/focus window on assign workspace
f***@ofb.net
2016-11-30 19:24:40 UTC
Permalink
Dear i3 people,

I'm trying to use the "assign" directive in my configuration file, for
the first time. I have a two-monitor setup and I would like for
certain windows to open up on a certain monitor. I tried these lines:

assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2

They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these new
windows are created, they always appear behind the "foreground" window
on that workspace - the contents of the windows is not visible, I just
see that the title has appeared. That's not very convenient, as e.g.
when a plot or web page opens I would like to view it.

Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change the
behavior.

I think that even if I had a single-head setup I would still like to
switch automatically to the workspace where the new window appeared...
but this doesn't seem to happen...

Thank you,

Frederick
Ingo Bürk
2016-11-30 20:03:39 UTC
Permalink
Hi,

does using both of


assign […] workspace 2

for_window […] focus


work? Either way, given that I'm pretty sure Firefox isn't a no-focus
window this sounds like a bug.


Ingo
Post by f***@ofb.net
Dear i3 people,
I'm trying to use the "assign" directive in my configuration file, for
the first time. I have a two-monitor setup and I would like for
assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2
They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these new
windows are created, they always appear behind the "foreground" window
on that workspace - the contents of the windows is not visible, I just
see that the title has appeared. That's not very convenient, as e.g.
when a plot or web page opens I would like to view it.
Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change the
behavior.
I think that even if I had a single-head setup I would still like to
switch automatically to the workspace where the new window appeared...
but this doesn't seem to happen...
Thank you,
Frederick
f***@ofb.net
2016-11-30 20:53:09 UTC
Permalink
Thank you, Ingo.

The "for_window [...] focus" indeed fixes the problem with Firefox.

However, for R_x11 (an R plotting window), I don't actually want to
focus the window - I just want to be able to look at it while I keep
typing in my terminal. Just remembering to keep the last plot open is
a suitable workaround, for me, but let me know if you can think of a
way to have it just appear in the foreground, with no focus. ...

Actually, I just found a solution:

for_window [class="R_x11"] fullscreen enable
for_window [class="R_x11"] fullscreen disable

This makes the plot window appear in the foreground, with no focus!

Now I just hope future versions of i3 don't optimize out those two
statements :)

Thanks,

Frederick
Post by Ingo Bürk
Hi,
does using both of
assign […] workspace 2
for_window […] focus
work? Either way, given that I'm pretty sure Firefox isn't a no-focus
window this sounds like a bug.
Ingo
Post by f***@ofb.net
Dear i3 people,
I'm trying to use the "assign" directive in my configuration file, for
the first time. I have a two-monitor setup and I would like for
assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2
They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these new
windows are created, they always appear behind the "foreground" window
on that workspace - the contents of the windows is not visible, I just
see that the title has appeared. That's not very convenient, as e.g.
when a plot or web page opens I would like to view it.
Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change the
behavior.
I think that even if I had a single-head setup I would still like to
switch automatically to the workspace where the new window appeared...
but this doesn't seem to happen...
Thank you,
Frederick
Ingo Bürk
2016-12-01 06:46:59 UTC
Permalink
Hi,

I'd say you found a ⁣​workaround, not a fix. I'd still prefer filing a bug for it but that's up to you. :-)

Ingo
Post by f***@ofb.net
Thank you, Ingo.
The "for_window [...] focus" indeed fixes the problem with Firefox.
However, for R_x11 (an R plotting window), I don't actually want to
focus the window - I just want to be able to look at it while I keep
typing in my terminal. Just remembering to keep the last plot open is
a suitable workaround, for me, but let me know if you can think of a
way to have it just appear in the foreground, with no focus. ...
for_window [class="R_x11"] fullscreen enable
for_window [class="R_x11"] fullscreen disable
This makes the plot window appear in the foreground, with no focus!
Now I just hope future versions of i3 don't optimize out those two
statements :)
Thanks,
Frederick
Post by Ingo Bürk
Hi,
does using both of
assign [
] workspace 2
for_window [
] focus
work? Either way, given that I'm pretty sure Firefox isn't a no-focus
window this sounds like a bug.
Ingo
Post by f***@ofb.net
Dear i3 people,
I'm trying to use the "assign" directive in my configuration file,
for
Post by Ingo Bürk
Post by f***@ofb.net
the first time. I have a two-monitor setup and I would like for
certain windows to open up on a certain monitor. I tried these
assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2
They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these
new
Post by Ingo Bürk
Post by f***@ofb.net
windows are created, they always appear behind the "foreground"
window
Post by Ingo Bürk
Post by f***@ofb.net
on that workspace - the contents of the windows is not visible, I
just
Post by Ingo Bürk
Post by f***@ofb.net
see that the title has appeared. That's not very convenient, as
e.g.
Post by Ingo Bürk
Post by f***@ofb.net
when a plot or web page opens I would like to view it.
Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change
the
Post by Ingo Bürk
Post by f***@ofb.net
behavior.
I think that even if I had a single-head setup I would still like
to
Post by Ingo Bürk
Post by f***@ofb.net
switch automatically to the workspace where the new window
appeared...
Post by Ingo Bürk
Post by f***@ofb.net
but this doesn't seem to happen...
Thank you,
Frederick
f***@ofb.net
2016-12-01 07:42:09 UTC
Permalink
Filing a bug! How about I write to the mailing list and hope that
someone else files a bug ;)
Hi,
I'd say you found a ⁣​workaround, not a fix. I'd still prefer filing a bug for it but that's up to you. :-)
Ingo
Post by f***@ofb.net
Thank you, Ingo.
The "for_window [...] focus" indeed fixes the problem with Firefox.
However, for R_x11 (an R plotting window), I don't actually want to
focus the window - I just want to be able to look at it while I keep
typing in my terminal. Just remembering to keep the last plot open is
a suitable workaround, for me, but let me know if you can think of a
way to have it just appear in the foreground, with no focus. ...
for_window [class="R_x11"] fullscreen enable
for_window [class="R_x11"] fullscreen disable
This makes the plot window appear in the foreground, with no focus!
Now I just hope future versions of i3 don't optimize out those two
statements :)
Thanks,
Frederick
Post by Ingo Bürk
Hi,
does using both of
assign […] workspace 2
for_window […] focus
work? Either way, given that I'm pretty sure Firefox isn't a no-focus
window this sounds like a bug.
Ingo
Post by f***@ofb.net
Dear i3 people,
I'm trying to use the "assign" directive in my configuration file,
for
Post by Ingo Bürk
Post by f***@ofb.net
the first time. I have a two-monitor setup and I would like for
certain windows to open up on a certain monitor. I tried these
assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2
They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these
new
Post by Ingo Bürk
Post by f***@ofb.net
windows are created, they always appear behind the "foreground"
window
Post by Ingo Bürk
Post by f***@ofb.net
on that workspace - the contents of the windows is not visible, I
just
Post by Ingo Bürk
Post by f***@ofb.net
see that the title has appeared. That's not very convenient, as
e.g.
Post by Ingo Bürk
Post by f***@ofb.net
when a plot or web page opens I would like to view it.
Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change
the
Post by Ingo Bürk
Post by f***@ofb.net
behavior.
I think that even if I had a single-head setup I would still like
to
Post by Ingo Bürk
Post by f***@ofb.net
switch automatically to the workspace where the new window
appeared...
Post by Ingo Bürk
Post by f***@ofb.net
but this doesn't seem to happen...
Thank you,
Frederick
Ingo Bürk
2016-12-01 07:46:47 UTC
Permalink
You can do that, but I doubt that anyone will.
Post by f***@ofb.net
Filing a bug! How about I write to the mailing list and hope that
someone else files a bug ;)
Hi,
I'd say you found a ⁣​workaround, not a fix. I'd still prefer filing a bug for it but that's up to you. :-)
Ingo
Post by f***@ofb.net
Thank you, Ingo.
The "for_window [...] focus" indeed fixes the problem with Firefox.
However, for R_x11 (an R plotting window), I don't actually want to
focus the window - I just want to be able to look at it while I keep
typing in my terminal. Just remembering to keep the last plot open is
a suitable workaround, for me, but let me know if you can think of a
way to have it just appear in the foreground, with no focus. ...
for_window [class="R_x11"] fullscreen enable
for_window [class="R_x11"] fullscreen disable
This makes the plot window appear in the foreground, with no focus!
Now I just hope future versions of i3 don't optimize out those two
statements :)
Thanks,
Frederick
Post by Ingo Bürk
Hi,
does using both of
assign […] workspace 2
for_window […] focus
work? Either way, given that I'm pretty sure Firefox isn't a no-focus
window this sounds like a bug.
Ingo
Post by f***@ofb.net
Dear i3 people,
I'm trying to use the "assign" directive in my configuration file,
for
Post by Ingo Bürk
Post by f***@ofb.net
the first time. I have a two-monitor setup and I would like for
certain windows to open up on a certain monitor. I tried these
assign [class="R_x11"] workspace 2
assign [class="Firefox"] workspace 2
They both work, in the sense that new windows of either class go to
workspace 2. However, Workspace 2 is in tabbed mode and when these
new
Post by Ingo Bürk
Post by f***@ofb.net
windows are created, they always appear behind the "foreground"
window
Post by Ingo Bürk
Post by f***@ofb.net
on that workspace - the contents of the windows is not visible, I
just
Post by Ingo Bürk
Post by f***@ofb.net
see that the title has appeared. That's not very convenient, as
e.g.
Post by Ingo Bürk
Post by f***@ofb.net
when a plot or web page opens I would like to view it.
Am I missing something? I tried various settings of
"focus_on_window_activation" but didn't seem to be able to change
the
Post by Ingo Bürk
Post by f***@ofb.net
behavior.
I think that even if I had a single-head setup I would still like
to
Post by Ingo Bürk
Post by f***@ofb.net
switch automatically to the workspace where the new window
appeared...
Post by Ingo Bürk
Post by f***@ofb.net
but this doesn't seem to happen...
Thank you,
Frederick
Loading...