Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set workspaces by number to specific output #4021

Closed
alemarciana opened this issue Apr 15, 2020 · 5 comments · Fixed by #4023
Closed

Set workspaces by number to specific output #4021

alemarciana opened this issue Apr 15, 2020 · 5 comments · Fixed by #4023
Labels
4.18 bug reproducible A bug that has been reviewed and confirmed by a project contributor

Comments

@alemarciana
Copy link

alemarciana commented Apr 15, 2020

[x] Bug (as seen on issue #3685, this should be default behaviour)
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

Assigning a workspace to an specific output (i.e workspace 6 output HDMI-1-1 eDP-1-1) and renaming it at the same time it gets created (i.e using an external script to rename workspaces according to its content) ends up on i3 creating a new workspace with the same number but the new name (i.e 6:named), moving original 6 workspace to HDMI-1-1 and keeping the new workspace on current screen (behavior previously documented on issue #3685 )

Desired Behavior

Explicitly assign workspace by number to output on config files as to avoid conflicts between named and non-named workspaces, i.e:

  • assign all workspaces with given number to specific output:
    workspace number 6 output HDMI-1-1
  • alternatively, assign specific named workspace to specific output:
    workspace 6:Browser output eDP-1-1
    This should end up on having all workspaces with number 6 on output HDMI-1-1 except for workspace 6:Browser (although having multiple workspaces with the same numbers shouldn't be a thing altogether)

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.18 (2020-02-18) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.18 (2020-02-18) (pid 632)to abort…)
- Linux Distribution & Version: Arch Linux, kernel 5.6.3-arch1-1
- Are you using a compositor (e.g., xcompmgr or compton): Yes, picom
@orestisfl
Copy link
Member

* alternatively, assign specific named workspace to specific output:
  `workspace 6:Browser output eDP-1-1`
  This should end up on having all workspaces with number 6 on output HDMI-1-1 except for workspace 6:Browser (although having multiple workspaces with the same numbers shouldn't be a thing altogether)

Doesn't this already work? https://i3wm.org/docs/userguide.html#workspace_screen

@orestisfl
Copy link
Member

Also, please attach said script

@nedimlisica
Copy link

* alternatively, assign specific named workspace to specific output:
  `workspace 6:Browser output eDP-1-1`
  This should end up on having all workspaces with number 6 on output HDMI-1-1 except for workspace 6:Browser (although having multiple workspaces with the same numbers shouldn't be a thing altogether)

Doesn't this already work? https://i3wm.org/docs/userguide.html#workspace_screen

Using number keyword is not possible for choosing the screen. eg. this does not work:

workspace number 6 output HDMI-1-1

The desired behaviour here would be to support syntax above and allow choosing the output screen for workspaces whose names begin in a number regardless of the rest of the name.
Currently if a workspace is configured to screen using

workspace 1 output HDMI-1-1

and renamed to for example "1 web", reloading the wm will result in a new workspace named "1" getting created, which is not desired.

@orestisfl
Copy link
Member

The part I am quoting is to assign a specific workspace name to an output and a number to a different output. See my link. Assigning by number is supported, just remove the 'number' token.

@nedimlisica
Copy link

That works, but problem is renaming workspace. Let's say workspace named "1" is assigned to HDMI1. Renaming it to eg. "1 web" makes i3 treat it as different workspace from that original "1" and if wm is reloaded, "1" is created again on HDMI1 and now two different workspaces exist, "1" and "1 web". Keyword "number" makes workspace switching key binds look at only the leading number in workspace name, so $mod + 1 will switch to "1 web" with no problems. We want the similar behaviour for output configuration, since currently renaming and assigning to the output don't play together.

workspace number 1 output HDMI1 LVDS1

So this should make workspace "1" open on HDMI, and make sure it gets moved back to it from LVDS1 in case that output was re-connected in the meantime, even thought it may have been renamed to somthing following the format of "1 new_name".

@orestisfl orestisfl added 4.18 bug reproducible A bug that has been reviewed and confirmed by a project contributor and removed enhancement labels Apr 16, 2020
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 16, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 16, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 16, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 16, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 30, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 30, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 18, 2020
The bug here is that workspace assignments with numbers are triggered
even if a named argument matches later on.

With this commit, get_assigned_output is called to correctly iterate the
workspace assignments.

Fixes i3#4021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.18 bug reproducible A bug that has been reviewed and confirmed by a project contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants