Replies: 1 comment
-
As far as I'm aware css doesn't read the contents of an element (or module in this case). The content or text itself will not affect any css styling. It's probably possible to use a script to read a module and update the css, although I'm not sure about that. You'd also need to reload Waybar's css for any changes to take effect by running |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To explain myself better, I'll just say what I want to do: I want to be able to use the values from the modules' format into the styling in order to make the modules have a color depending on the number shown.
For example, the
pulseaudio
module gradually goes from a white background to a blue one when the volume is increased in the 0-100% interval, and then gradually goes from blue to red in the 100-150% interval.I've seen no mention of using the actual values of the modules in CSS while reading the wiki. We just have cases we can style (ex.
#pulseaudio
is the default one, and then there's customizations for#pulseaudio.muted
,#pulseaudio.source-muted
etc.), and that's unfortunate.Of course, I'd use this for more than just the
pulseaudio
module, I'd use it for basically everything that shows a value (backlight
,battery
, evennetwork
for the wifi signal strength`), but I just gave an example.Did I just gloss over this, or does anyone know how to get this working?
Beta Was this translation helpful? Give feedback.
All reactions