Support for colors/markup
pinpox opened this issue · 2 comments
pinpox commented
soumya92 commented
Here's a brief write-up of pango on the website: barista.run/pango, and the godoc might also be useful. Feel free to send PRs to update any parts of the docs that aren't clear.
The underlines might not look exactly the same, since pango markup doesn't allow changing the width of the underline. But to get the volume output, for example, the code would be something like:
package main
import (
"image/color"
barista "barista.run"
"barista.run/bar"
"barista.run/modules/volume"
"barista.run/pango"
"barista.run/pango/icons/ionicons"
)
func main() {
ionicons.Load("/home/Github/ionicons")
barista.Run(
volume.DefaultMixer().Output(func(v volume.Volume) bar.Output {
return pango.Icon("ion-md-volume-high").
AppendTextf("%d", v.Pct()).
UnderlineLow().
UnderlineColor(color.RGBA{0, 0, 0xab, 0xff})
}),
)
}
soumya92 commented
I'm currently working on getting some themes up and running, and as part of that I will probably end up with support for the i3-gaps version of i3bar, which has more border customisations. So it's likely that your screenshot could be provided as a theme once that work is done.