Skip to content

feat(workspaces): style based upon workspace having windows#1403

Draft
antlilja wants to merge 2 commits intoJakeStanger:masterfrom
antlilja:master
Draft

feat(workspaces): style based upon workspace having windows#1403
antlilja wants to merge 2 commits intoJakeStanger:masterfrom
antlilja:master

Conversation

@antlilja
Copy link
Copy Markdown

@antlilja antlilja commented Feb 28, 2026

Adds the ability to style workspaces based upon it containing any windows using the empty css class.

Example:

.workspaces .item:not(.empty) label {
    font-weight: bold;
}

I've only implemented this for hyprland so far. I wanted to open up this draft PR to see if this is a desired feature before continuing on implementing it for sway and niri.

@JakeStanger
Copy link
Copy Markdown
Owner

JakeStanger commented Feb 28, 2026

I'm happy for this to be added, but some consideration is needed as to how this will work with #820.

I also think this would be better inverted btw, ie an .empty class. Not empty becomes the default of omitted, and you can use :not(.empty) where required that way, which avoids the double negative.

Workspaces can now be styled based on if they haved windows or not by
using the "empty" css class.
@antlilja
Copy link
Copy Markdown
Author

Totally agree with empty over notempty, much cleaner. I've pushed a change to switch to the empty css class instead.

I took a look at ext-workspace-v1 as well as the IPC for sway and niri. It does not seem to be possible to implement this feature for the wayland extension. Both Niri and Sway seem possible to implement this feature in.

@JakeStanger
Copy link
Copy Markdown
Owner

Yeah I suspect the play will be having an (optional) IPC layer on top of the wayland layer to bring in the extra functionality. I don't think it'll have too much impact at this stage, but worth keeping in mind.

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.

2 participants