-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Ability to use icons for empty workspace.
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.
- Loading branch information
1 parent
8bde72d
commit 8906afc
Showing
6 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "workstyle" | ||
version = "0.8.2" | ||
version = "0.9.0" | ||
authors = ["Pierre Chevalier <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters