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

Hyprland workspace focus() doesn't work for named workspaces #167

Open
lwukusick opened this issue Dec 7, 2024 · 2 comments
Open

Hyprland workspace focus() doesn't work for named workspaces #167

lwukusick opened this issue Dec 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@lwukusick
Copy link

When calling Workspace.focus on a workspace that is named (e.g. with workspace=name:my_workspace in hyprland.conf), the workspace with id 1 (and no explicit name) is focused instead. Calling focus on workspaces with no explicit name works as expected.

I believe this is just a matter of incorrectly using the workspace ID instead of the workspace name. Calling Hyprland.get_default().dispatch("workspace", ws.name) myself works as expected, but using ws.id.toString() instead of ws.name produces the same incorrect behavior.

@lwukusick lwukusick added the bug Something isn't working label Dec 7, 2024
@Aylur
Copy link
Owner

Aylur commented Dec 9, 2024

According to the hyprland wiki when using names they have to be prefixed with name: so I'm not sure about dispatch("workspace", ws.name)

@lwukusick
Copy link
Author

Interesting. Maybe they're more permissive than the spec. Presumably "name:" + ws.name would work then too.

Reading that section, it looks like the issue is that Hyprland is assigning my named workspaces negative IDs, which is explicitly described as disallowed for dispatchers in that bottom orange textbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants