Add default windows format in hyprland #4149
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a proposal to add a default windows format to be used when there are no windows in the workspace in Hyprland. It is currently possible to default each window to an icon, but it is not possible to do so when there are no windows.
Currently, when a workspace has no windows,
{windows}
gets formatted to an empty string. With this proposal,{windows}
may get formatted to something more useful instead, like the workspace ID.The new JSON key is named
format-windows-default
and does not substitute{windows}
, only{id}
,{name}
and{icon}
.I also went a bit out of my way to add a separate method that is responsible of creating the formatted
{windows}
string, to reduce the clutter insidehyprland::Workspace::update
.Example
I tested in my own setup adding
.
"format-windows-default": "<b>{id}</b>"
to my ´hyprland/workspacesmodule with "format": "{windows}"
(top bar is with the change)About sway
Probably this change could be ported to sway too, but since I'm not a sway user I only worked on the hyprland solution.