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

Style.css for Module wlr/workspaces does not apply properly on Hyprland #2121

Closed
theshatterstone opened this issue Apr 17, 2023 · 6 comments
Closed

Comments

@theshatterstone
Copy link

Hi. Thank you for waybar, and thank you for merging the persistent workspaces code. An issue I've been having for a while is with the waybar style.css for the module wlr/workspaces. The options like button.visible and button.hidden don't work on Hyprland. I decided to use the following css code to test this:

#workspaces {
    padding: 0 2px;
    background: purple;
    color: #889fa7;
    border-bottom: 2px solid transparent;
}

#workspaces button {
    padding: 0 2px;
    background: yellow;
    color: #889fa7;
    border-bottom: 2px solid transparent;
}

#workspaces button.active {
    background: transparent;
    color: #dfdfdf; 
    border-bottom: 2px solid #51afef;
}

#workspaces button.focused {
    background: transparent;
    color: #dfdfdf; 
    border-bottom: 2px solid #51afef;
}

#workspaces button.visible {
    background: orange;
    color: #889fa7;
    border-bottom: 2px solid transparent;
}

#workspaces button.urgent {
    background: red;
    color: #889fa7;
    border-bottom: 2px solid transparent;
}

#workspaces button.hidden {
    background: green;
    color: #889fa7;
    border-bottom: 2px solid transparent;
}

The result was that the styling from #workspaces and #workspaces button apply over the styling for button.visible, button.hidden, and button.urgent. In fact, even when I comment out the #workspaces and #workspaces button sections, the other ones don't apply. For the version, I'm running waybar from the latest sources as of the time of writing this issue, installed using the PKGBUILD from the waybar-hyprland-git AUR package.

@AndreasBackx
Copy link
Contributor

This is blocked by hyprwm/Hyprland#2102 because there is no way right now that Waybar can know whether or not something is on screen or not because Hyprland does not set those values (neither does it set urgent). Once it does, it should be able to distinguish whether something is visible by looking at whether or not it's hidden. You'll have to rely on not(:.hidden) then until Waybar makes a change for this module that sets .visible if it's not hidden, which it currently does not.

@theshatterstone
Copy link
Author

Hi there @AndreasBackx Thank you for your fast response. Just make sure I got it right: Hyprland needs to find a way to distinguish between these workspace states, and then Waybar needs to implement a way to check for these states, right? So, there's currently nothing that can be done about it, until Hyprland gets this implemented? Thank you.

@AndreasBackx
Copy link
Contributor

From what I understand, yes. The protocol is not stable/merged yet and is still changing. If the workspace is not visible on the output, it should be hidden so we can then set .visible in Waybar. (Again, from what I understand in the protocol.)

@Barbaross93
Copy link

Barbaross93 commented Apr 21, 2023

I'm in a similar position. I can't change the foreground color for any states of wlr/workspaces. Oddly though, I can change the background color and some other propoerties like padding for some of the states.

EDIT:
This was the solution for me in regards to foreground color, but the mater of foreground colors for hidden/visible/urgent still doesn't work.

@theshatterstone
Copy link
Author

Hello @Barbaross93 @AndreasBackx this issue has basically been fixed by #2153 and as such, I will close this issue.

@AndreasBackx
Copy link
Contributor

@theshatterstone neat! I faced this when trying to move to Hyprland, though haven't made the switch as there are some bigger issues. Hoping it works, but cannot verify from my side. Though pretty sure it works. Thank you!

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

No branches or pull requests

3 participants