i3status-rust
i3status-rust copied to clipboard
Global format pango (similar to icons_format but for output)
I would like to see an option for affecting the format = "" string globally.
Currently you can only change the icons and short error text:
icons_format = "<span font_family='FiraCode Nerd Font'>{icon}</span>"
error_format = " $short_error_message |X"
error_fullscreen_format = "<span font_family='serif'>$full_error_message</span>" # does not work
I propose a global option like this:
content_format = "<span font-family='Lato'> {format} </span>"
I am aware of #981 and the difficulties with excluding icons. However, a workaround could be to nest the pango, or if it does not work like that, append the text before and after the inner content to that content and just use the pango tags for the areas that aren't considered icons.
# current config.toml
icons_format = "<span font_family='FiraCode Nerd Font'>{icon}</span>"
...
[[block]]
block = "net"
format = " ^icon_net_down $speed_down.eng(w:2) ^icon_net_up $speed_up.eng(w:2) "
# current output
" <span font_family='FiraCode Nerd Font'></span> 0B <span font_family='FiraCode Nerd Font'></span> 0B "
# proposed configuration
content_format = "<span font-family='Lato'> {format} </span>"
icons_format = "<span font_family='FiraCode Nerd Font'>{icon}</span>"
...
[[block]]
block = "net"
format = "^icon_net_down $speed_down.eng(w:2) ^icon_net_up $speed_up.eng(w:2)"
# wrap output
"<span font-family='Lato'> <span font_family='FiraCode Nerd Font'></span> 0B <span font_family='FiraCode Nerd Font'></span> 0B </span>"
# Scuffed output
"<span font-family='Lato'> </span><span font_family='FiraCode Nerd Font'></span><span font-family='Lato'> 0B </span><span font_family='FiraCode Nerd Font'></span><span font-family='Lato'> 0B </span>"
I hope you consider this!