Discussion:
[i3-discuss] dynamic assignment of workspace to an outpur
Serge van Ginderachter
2016-12-02 19:42:38 UTC
Permalink
I'm aware of

https://i3wm.org/docs/userguide.html#workspace_screen

which is very fine on a 'fixed' workstation, but unusable on a laptop
connecting to multiple different screens, and where the primary screen
is sometimes the laptop's, sometimes an external screen.


My question is, what are the options to define the display names
dynamically? SOme scipt can probably sole what I want to do, but
before diving into that, I'd likje to be sure of all options. Perhaps
something similar already exists?

Additionally, is this an area where a feature request to allow a more
dynamic configuration would be acceptable? For my use case, being able
to to always put a workspace on the primary monitor, and others on a
'secondary', would be ideal.


Thanks,



Serge
Layus
2016-12-02 20:19:38 UTC
Permalink
Hi Serge,

I asked the same question some time ago.
You will find the related thread (Assign workspaces to outputs
dynamically) at
http://www.freelists.org/archive/i3-discuss/02-2015?threads=1#00001.

But be prepared to some disappointement here because i3 has a static
workspace config option, but no corresponding command to be used with
i3-msg.
My current solution is to

1. sed the config file tu update monitor names
2. move my workspaces with i3-msg
3. reload (restart ?) i3

You will find the script in the above ML thread.
Post by Serge van Ginderachter
I'm aware of
https://i3wm.org/docs/userguide.html#workspace_screen
which is very fine on a 'fixed' workstation, but unusable on a laptop
connecting to multiple different screens, and where the primary screen
is sometimes the laptop's, sometimes an external screen.
My question is, what are the options to define the display names
dynamically? SOme scipt can probably sole what I want to do, but
before diving into that, I'd likje to be sure of all options. Perhaps
something similar already exists?
Additionally, is this an area where a feature request to allow a more
dynamic configuration would be acceptable? For my use case, being able
to to always put a workspace on the primary monitor, and others on a
'secondary', would be ideal.
Thanks,
Serge
Layus
2016-12-02 20:24:03 UTC
Permalink
Sorry, my message was sent too fast.

I wanted to add that you are welcome to dig into this issue.
I would be very happy to see some improvements in this area.
I could at least test and review patches.

-- Layus.
Post by Layus
Hi Serge,
I asked the same question some time ago.
You will find the related thread (Assign workspaces to outputs
dynamically) at
http://www.freelists.org/archive/i3-discuss/02-2015?threads=1#00001.
But be prepared to some disappointement here because i3 has a static
workspace config option, but no corresponding command to be used with
i3-msg.
My current solution is to
1. sed the config file tu update monitor names
2. move my workspaces with i3-msg
3. reload (restart ?) i3
You will find the script in the above ML thread.
Post by Serge van Ginderachter
I'm aware of
https://i3wm.org/docs/userguide.html#workspace_screen
which is very fine on a 'fixed' workstation, but unusable on a laptop
connecting to multiple different screens, and where the primary screen
is sometimes the laptop's, sometimes an external screen.
My question is, what are the options to define the display names
dynamically? SOme scipt can probably sole what I want to do, but
before diving into that, I'd likje to be sure of all options. Perhaps
something similar already exists?
Additionally, is this an area where a feature request to allow a more
dynamic configuration would be acceptable? For my use case, being able
to to always put a workspace on the primary monitor, and others on a
'secondary', would be ideal.
Thanks,
Serge
Ingo Bürk
2016-12-02 20:54:26 UTC
Permalink
With 4.13 you could turn output names into variables that you load via
Xresources. Then changing them would be changing the X resource database
and reloading the i3 config. In your .Xresources you could even use some
basic logic via preprocessor directives and based on some variables such
as host.

Regarding features it'd probably be better to file this as a feature
request on Github.


Ingo
Post by Layus
Hi Serge,
I asked the same question some time ago.
You will find the related thread (Assign workspaces to outputs
dynamically) at
http://www.freelists.org/archive/i3-discuss/02-2015?threads=1#00001.
But be prepared to some disappointement here because i3 has a static
workspace config option, but no corresponding command to be used with
i3-msg.
My current solution is to
1. sed the config file tu update monitor names
2. move my workspaces with i3-msg
3. reload (restart ?) i3
You will find the script in the above ML thread.
Post by Serge van Ginderachter
I'm aware of
https://i3wm.org/docs/userguide.html#workspace_screen
which is very fine on a 'fixed' workstation, but unusable on a laptop
connecting to multiple different screens, and where the primary screen
is sometimes the laptop's, sometimes an external screen.
My question is, what are the options to define the display names
dynamically? SOme scipt can probably sole what I want to do, but
before diving into that, I'd likje to be sure of all options. Perhaps
something similar already exists?
Additionally, is this an area where a feature request to allow a more
dynamic configuration would be acceptable? For my use case, being able
to to always put a workspace on the primary monitor, and others on a
'secondary', would be ideal.
Thanks,
Serge
Serge van Ginderachter
2016-12-03 09:01:35 UTC
Permalink
Hi Layous, Ingo & All,

Seems I even replied in Layus' thread :)

I just tried out setting worpsaces through Xresources, and that seems to work.
It seems however existing workspaces are sometimes moved to another
screen (when that screen gets activated), and sometimes not. I'm not
sure what happens when.

Now I need to fill in an ~.Xresource.d/i3 based on my dynamic screen
setup, which by the way I handle with the rerandr3, which does a very
nice job at dynamically setting xrandr.
(https://github.com/Vladimir-csp/rerandr3)


Thanks,


Serge
Post by Ingo Bürk
With 4.13 you could turn output names into variables that you load via
Xresources. Then changing them would be changing the X resource database
and reloading the i3 config. In your .Xresources you could even use some
basic logic via preprocessor directives and based on some variables such
as host.
Regarding features it'd probably be better to file this as a feature
request on Github.
Ingo
Post by Layus
Hi Serge,
I asked the same question some time ago.
You will find the related thread (Assign workspaces to outputs
dynamically) at
http://www.freelists.org/archive/i3-discuss/02-2015?threads=1#00001.
But be prepared to some disappointement here because i3 has a static
workspace config option, but no corresponding command to be used with
i3-msg.
My current solution is to
1. sed the config file tu update monitor names
2. move my workspaces with i3-msg
3. reload (restart ?) i3
You will find the script in the above ML thread.
Post by Serge van Ginderachter
I'm aware of
https://i3wm.org/docs/userguide.html#workspace_screen
which is very fine on a 'fixed' workstation, but unusable on a laptop
connecting to multiple different screens, and where the primary screen
is sometimes the laptop's, sometimes an external screen.
My question is, what are the options to define the display names
dynamically? SOme scipt can probably sole what I want to do, but
before diving into that, I'd likje to be sure of all options. Perhaps
something similar already exists?
Additionally, is this an area where a feature request to allow a more
dynamic configuration would be acceptable? For my use case, being able
to to always put a workspace on the primary monitor, and others on a
'secondary', would be ideal.
Thanks,
Serge
Serge van Ginderachter
2016-12-03 11:09:48 UTC
Permalink
On 3 December 2016 at 10:01, Serge van Ginderachter
Post by Serge van Ginderachter
Now I need to fill in an ~.Xresource.d/i3 based on my dynamic screen
setup, which by the way I handle with the rerandr3, which does a very
nice job at dynamically setting xrandr.
(https://github.com/Vladimir-csp/rerandr3)
And I just did that:

https://github.com/srvg/dotfiles/commit/71cdd2139859a8eca1d1eae0e791ec2babc6369c
https://github.com/srvg/rerandr3/commit/a43a50e5ad675e43c81cc6459c8f953a1f5e4b11


Thanks for the pointers, and HTH,


Serge
Layus
2016-12-03 12:18:29 UTC
Permalink
Post by Serge van Ginderachter
On 3 December 2016 at 10:01, Serge van Ginderachter
Post by Serge van Ginderachter
Now I need to fill in an ~.Xresource.d/i3 based on my dynamic screen
setup, which by the way I handle with the rerandr3, which does a very
nice job at dynamically setting xrandr.
(https://github.com/Vladimir-csp/rerandr3)
https://github.com/srvg/dotfiles/commit/71cdd2139859a8eca1d1eae0e791ec2babc6369c
https://github.com/srvg/rerandr3/commit/a43a50e5ad675e43c81cc6459c8f953a1f5e4b11
Thanks for the pointers, and HTH,
Serge
Neatly done !

Xressources handling simplifies things a lot.

Loading...