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

Keep workspace icon instead of number with waybar? #39

Open
tmpm697 opened this issue Apr 16, 2022 · 1 comment · May be fixed by #58
Open

Keep workspace icon instead of number with waybar? #39

tmpm697 opened this issue Apr 16, 2022 · 1 comment · May be fixed by #58

Comments

@tmpm697
Copy link

tmpm697 commented Apr 16, 2022

I have waybar setting like:

format-icons": {
  "10":  "<This is an icon>"

That will display only an icon for workspace name.

If I run workstyle, it will convert icon to workspace that mapped from sway/config, how to have icons as workspace and also display applications next to it?

I ask this because I use some special icons for workspaces that can distinguish them from applications' icons.

also asked here: Alexays/Waybar#1521 (comment)

@tmpm697 tmpm697 changed the title Keep workspace icon instead of name with waybar? Keep workspace icon instead of number with waybar? Apr 16, 2022
@jkim5959
Copy link

yeah i second this. I actually wanna get rid of workspace number and just use application icons since the colouring will distinguish different workspaces anyway.

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
2 participants