scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
459 stars 17 forks source link

Add CSS classes #72

Closed CaptaiNiveau closed 8 months ago

CaptaiNiveau commented 8 months ago

This PR adds classes to every widget.

Introduces a breaking change for the lock-button, which needs to be added to the style.css manually if you're using a custom one.

Every widget gets a "widget" class as well as a specific one like an id. In the future, names/ids should be used for that. Also cleaned up the sensors a little as well as the related CSS.

Fixes #70.

LMK if there's anything I forgot.

Soliprem commented 8 months ago

Do you have discord, by chance? It'd be nice to start off on the right foot with the documentation (re: #71 ) if the change is implemented, and I think it'd be easier to coordinate over there

Soliprem commented 8 months ago

It seems .left extends all the way to the middle.. would it be possible (although beyond the scope of this PR) to create a separate "spacer" module, detached from the "left" and "center" modules that's always transparent (and can be set to width: 0, if necessary) so that manipulation of left's background-color will only impact the areas with a visible widget?

Even given this, this PR is a massive improvement, LGTM!

scorpion-26 commented 8 months ago

LGTM, thanks!

It seems .left extends all the way to the middle.

That's an artifact of the CenterTime/TimeSpace config variable and a known issue. I'll probably change the left class to an inner box component, which wouldn't have this problem. In the meantime you can use workspaces instead. (Assuming that's the only widget on the left side)

Soliprem commented 8 months ago

yes, that's what I did. expect a big unixporn post with gBar soon ™️

CaptaiNiveau commented 8 months ago

Do you have discord, by chance? It'd be nice to start off on the right foot with the documentation (re: #71 ) if the change is implemented, and I think it'd be easier to coordinate over there

Yeah I do, same as my GH name.