Skip to content

i3/workspace: Use name instead of id for activate#643

Open
badly-drawn-wizards wants to merge 1 commit intoquickshell-mirror:masterfrom
badly-drawn-wizards:master
Open

i3/workspace: Use name instead of id for activate#643
badly-drawn-wizards wants to merge 1 commit intoquickshell-mirror:masterfrom
badly-drawn-wizards:master

Conversation

@badly-drawn-wizards
Copy link

Mirrors the change made for hyprland/workspace in f90bef2 and does it for i3/sway.

@outfoxxed
Copy link
Member

Why? Does I3 support relative navigation? It's manual doesn't seem to indicate that it does.

@badly-drawn-wizards
Copy link
Author

6.8. Changing (named) workspaces/moving to workspaces

To change to a specific workspace, use the workspace command, followed by the number or name of the workspace.
From https://i3wm.org/docs/userguide.html

workspace ${ws.name} does indeed function for both i3 and sway

For the same reason the hyprland change was made: named workspaces without a number prefix in their name have a number of -1, which fail to activate, whereas using the name always succeeds as the name uniquely identifies the workspace.

Not sure what you are referring to with relative navigation. This is about switching to workspace by name rather than number. If that is relative navigation, which I don't think is what you meant, then yes it is supported in i3/sway.

@outfoxxed
Copy link
Member

outfoxxed commented Mar 19, 2026

The reason for the hyprland change was that navigation to negative workspace ids triggered relative navigation instead. Just to clarify, unnamed i3 workspaces will still work with ${name}? Also are we supposed to string escape it?

@badly-drawn-wizards
Copy link
Author

I have tested with sway with named (with and without spaces) and unnamed workspaces. String escaping would be better, I was just following the hyprland change bar for bar.

I will further test with i3 to make sure that it behaves as sway does, but documentation suggests that it does.

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.

2 participants