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

[Bug]: failure to handle non-numeric workspace names in event listeners #69

Open
nikitax44 opened this issue Jan 30, 2025 · 1 comment · May be fixed by #75
Open

[Bug]: failure to handle non-numeric workspace names in event listeners #69

nikitax44 opened this issue Jan 30, 2025 · 1 comment · May be fixed by #75

Comments

@nikitax44
Copy link

Traceback (most recent call last):
  File "/nix/store/amiigsxp7gm7lmg8vd5snrz4mr6fgzwz-python3-3.12.8-env/lib/python3.12/site-packages/fabric/hyprland/widgets.py", line 203, in on_workspace
    active_workspace = self.do_get_workspace_id(event)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/amiigsxp7gm7lmg8vd5snrz4mr6fgzwz-python3-3.12.8-env/lib/python3.12/site-packages/fabric/hyprland/widgets.py", line 315, in do_get_workspace_id
    return int(ws)
           ^^^^^^^
ValueError: invalid literal for int() with base 10: 'default:(1 1)'

cause: fabric listens for event::workspace insead of event::workspacev2 to handle workspace events (and also createworkspace and destroyworkspace instead of v2 versions).

the old events do not contain workspace_id, only workspace_name.

see fabric/hyprland/widgets.py:157

@nikitax44 nikitax44 marked this as a duplicate of #73 Jan 30, 2025
@nikitax44 nikitax44 marked this as a duplicate of #72 Jan 30, 2025
@nikitax44 nikitax44 marked this as a duplicate of #71 Jan 30, 2025
@nikitax44 nikitax44 marked this as a duplicate of #70 Jan 30, 2025
@nikitax44 nikitax44 linked a pull request Jan 30, 2025 that will close this issue
@its-darsh
Copy link
Contributor

Image

What happened?

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 a pull request may close this issue.

2 participants