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

Persistent workspaces #33

Open
andersfylling opened this issue Feb 20, 2022 · 2 comments · May be fixed by #58
Open

Persistent workspaces #33

andersfylling opened this issue Feb 20, 2022 · 2 comments · May be fixed by #58

Comments

@andersfylling
Copy link

So this is finally a thing now: Alexays/Waybar#330

I wondered if there is a way to use workstyle with persistent workspaces?

@pierrechevalier83
Copy link
Owner

I wondered if there is a way to use workstyle with persistent workspaces?

I just tried it and it doesn't work well together as far as I can tell.
waybar persists a workspace with a fixed name like "1" and workstyle changes the names of workspaces, so that means that you will have side-by-side the persistent workspace "1" and the workspace: "1: " or whatnot.

I think the best way to approach this would probably be to add support for persistent workspaces in workstyle, by-passing waybar's implementation entirely.

That would be an interesting feature to add. It would also be interesting to consider how it would interact with multiple monitors.

@MaxVerevkin
Copy link
Contributor

That would be an interesting feature to add

Is it possible though? I can't think of a way to implement this.

so-rose added a commit to so-rose/workstyle that referenced this issue Dec 13, 2022
This allows users of ex. `waybar` to use dynamic icons,
while still giving empty workspaces an icon instead of a number.
This is implemented by renaming new workspaces right when they
are created.
This is all behind a config option; defaults remain unchanged.

Implementing this is also an optimization for the rest of the program,
which no longer recalculates workspace naming on _every_ `Event::Window`.
Instead, only specific `Window` (and now also `Workspace`) events
will do so.

**Caveats**:
- There is a small visual artifact when opening a new workspace,
when the number gets renamed to the desired icon.. Unfortunately,
being a program reacting to sway events, I don't see a way to fix this.

**Future Possibilities**:
- Allowing specific icons for specific numbered (empty) workspaces
wouldn't be difficult to add (which would close pierrechevalier83#33).
- Which `*.change` types precisely should trigger workspace renaming
was determined with common sense, and could do with a one-over.
The relevant function is `should_rename_after_event`.

Closes pierrechevalier83#39.
pierrechevalier83 pushed a commit that referenced this issue Apr 15, 2023
This allows users of ex. `waybar` to use dynamic icons,
while still giving empty workspaces an icon instead of a number.
This is implemented by renaming new workspaces right when they
are created.
This is all behind a config option; defaults remain unchanged.

Implementing this is also an optimization for the rest of the program,
which no longer recalculates workspace naming on _every_ `Event::Window`.
Instead, only specific `Window` (and now also `Workspace`) events
will do so.

**Caveats**:
- There is a small visual artifact when opening a new workspace,
when the number gets renamed to the desired icon.. Unfortunately,
being a program reacting to sway events, I don't see a way to fix this.

**Future Possibilities**:
- Allowing specific icons for specific numbered (empty) workspaces
wouldn't be difficult to add (which would close #33).
- Which `*.change` types precisely should trigger workspace renaming
was determined with common sense, and could do with a one-over.
The relevant function is `should_rename_after_event`.

Closes #39.
pierrechevalier83 pushed a commit that referenced this issue Apr 15, 2023
This allows users of ex. `waybar` to use dynamic icons,
while still giving empty workspaces an icon instead of a number.
This is implemented by renaming new workspaces right when they
are created.
This is all behind a config option; defaults remain unchanged.

Implementing this is also an optimization for the rest of the program,
which no longer recalculates workspace naming on _every_ `Event::Window`.
Instead, only specific `Window` (and now also `Workspace`) events
will do so.

**Caveats**:
- There is a small visual artifact when opening a new workspace,
when the number gets renamed to the desired icon.. Unfortunately,
being a program reacting to sway events, I don't see a way to fix this.

**Future Possibilities**:
- Allowing specific icons for specific numbered (empty) workspaces
wouldn't be difficult to add (which would close #33).
- Which `*.change` types precisely should trigger workspace renaming
was determined with common sense, and could do with a one-over.
The relevant function is `should_rename_after_event`.

Closes #39.
pierrechevalier83 pushed a commit that referenced this issue Apr 15, 2023
This allows users of ex. `waybar` to use dynamic icons,
while still giving empty workspaces an icon instead of a number.
This is implemented by renaming new workspaces right when they
are created.
This is all behind a config option; defaults remain unchanged.

Implementing this is also an optimization for the rest of the program,
which no longer recalculates workspace naming on _every_ `Event::Window`.
Instead, only specific `Window` (and now also `Workspace`) events
will do so.

**Caveats**:
- There is a small visual artifact when opening a new workspace,
when the number gets renamed to the desired icon.. Unfortunately,
being a program reacting to sway events, I don't see a way to fix this.

**Future Possibilities**:
- Allowing specific icons for specific numbered (empty) workspaces
wouldn't be difficult to add (which would close #33).
- Which `*.change` types precisely should trigger workspace renaming
was determined with common sense, and could do with a one-over.
The relevant function is `should_rename_after_event`.

Closes #39.
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.

3 participants