Skip to content

Add default windows format in hyprland #4149

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Xaunther
Copy link

@Xaunther Xaunther commented May 28, 2025

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 inside hyprland::Workspace::update.

Example

I tested in my own setup adding "format-windows-default": "<b>{id}</b>" to my ´hyprland/workspaces module with "format": "{windows}" (top bar is with the change)
image.

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.

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 this pull request may close these issues.

1 participant