Skip to content

[feat] sway/workspaces: refer to outputs by their monitor identifier in persistent-workspaces#5073

Open
ar-turek wants to merge 2 commits into
Alexays:masterfrom
ar-turek:persistent_workspaces_by_monitor_make_and_model
Open

[feat] sway/workspaces: refer to outputs by their monitor identifier in persistent-workspaces#5073
ar-turek wants to merge 2 commits into
Alexays:masterfrom
ar-turek:persistent_workspaces_by_monitor_make_and_model

Conversation

@ar-turek
Copy link
Copy Markdown

@ar-turek ar-turek commented May 26, 2026

This PR extends the persistent-workspaces functionality in sway/workspaces with an option of pinning workspaces to displays by their output identifiers (basically, the monitor's "make and model", usually given as a vendor/model/serial triple) in addition to their output name (e.g. DP-3, which is unstable and can change between reboots).

That means instead of this:

{
    ...
    "sway/workspaces": {
        ...
        "persistent-workspaces": {
            "1:main": ["DP-2"],
            "2:code": ["DP-2"],
            "3:secondary": ["DP-3"],
            "0:TV": ["HDMI-A-1"]
        }
    },
    ...
}

we can now write this:

{
    ...
    "sway/workspaces": {
        ...
        "persistent-workspaces": {
            "1:main": ["Dell Inc. Dell AW2518H #ASM0cCiovard"],
            "2:code": ["Dell Inc. Dell AW2518H #ASM0cCiovard"],
            "3:secondary": ["AOC 24P4CV XL9RAHA000298"],
            "0:TV": ["Philips Consumer Electronics Company Philips FTV 0x01010101"]
        }
    },
    ...
}

and even if the outputs are renamed after a reboot the workspaces will still be assigned to correct displays.

@ar-turek ar-turek changed the title Persistent workspaces by monitor make and model sway/workspaces: refer to outputs by their monitor identifier in persistent-workspaces May 26, 2026
@ar-turek
Copy link
Copy Markdown
Author

ar-turek commented May 26, 2026

Please let me know if you'd like me to make an update to the wiki as well, if/when this is merged - I'm not sure if it's possible to stage wiki changes as PRs as well.

@ar-turek ar-turek changed the title sway/workspaces: refer to outputs by their monitor identifier in persistent-workspaces [feat] sway/workspaces: refer to outputs by their monitor identifier in persistent-workspaces May 26, 2026
@ar-turek
Copy link
Copy Markdown
Author

I've also noticed the potential effect this PR has on this other one: #5072 - I can facilitate integration of those two, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant