custom: Change external binary output format to TAB instead of newline

pull/1898/head
Dmitry 2022-12-21 17:28:36 +02:00
parent 3e48551f25
commit c79942c0a9
2 changed files with 3 additions and 3 deletions

View File

@ -124,11 +124,11 @@ This should look like this:
The *class* parameter also accepts an array of strings.
If nothing or an invalid option is specified, Waybar expects i3blocks style output. Values are *newline* separated.
If nothing or an invalid option is specified, Waybar expects *Tab* delemited output.
This should look like this:
```
$text\\n$tooltip\\n$class*
$text\\t$tooltip\\t$class\\n*
```
*class* is a CSS class, to apply different styles in *style.css*

View File

@ -165,7 +165,7 @@ void waybar::modules::Custom::parseOutputRaw() {
std::istringstream output(output_.out);
std::string line;
int i = 0;
while (getline(output, line)) {
while (getline(output, line, '\t')) {
if (i == 0) {
if (config_["escape"].isBool() && config_["escape"].asBool()) {
text_ = Glib::Markup::escape_text(line);