domsson / succade

Run, feed and style your Lemonbar with ease
Creative Commons Zero v1.0 Universal
55 stars 3 forks source link

Add support for conditional formatting #23

Open domsson opened 4 years ago

domsson commented 4 years ago

Currently, the biggest disadvantage of succade + lemonbar over other solutions, like polybar, is that it isn't possible to have conditional formatting. For example, you might want to have the CPU temperature string be displayed in blue for low temperatures, yellow for mid-range temperatures and red for high temperatures. We can't do this at the moment.

Here is an idea of how this could be implemented:

Example block config:

[temperature:default]
bin = "temps -m"
foreground = "#ffff00"

[temperature:low]
foreground = "#0000ff"

[temperature:high]
foreground = "#ff0000"

Example stderr output of temps -m when a certain temperature change is detected:

@mode:high