i3bar and conky => using ifs from conky in JSON?
Hello,
I want to make a wlan notification using conky. The code below results in
"Error: Could not parse JSON (parse error: invalid object key (must be a string))"
According to http://i3wm.org/docs/i3bar-protocol.html the syntax and that should work, so i assume the error is caused by the ifs from conky.
I want one single block, with the strings "WLAN" (in e.g. gray) and "1" if the wlan interface is up and "0" when its down. (in red, respecively green)
How could i make this work?
EDIT: I use instead of this approach now a seperate block for both strings, but with "separator": false
My conkyrc:
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
total_run_times 0
if_up_strictness address
use_spacer left
override_utf8_locale no
cpu_avg_samples 2
TEXT
[
{ # <-- caused error
{
"full_text": "WLAN: ",
"color": "\#432355"
},
{
"full_text":
${if_up wlan0}
"1 ",
${else}
"0 ",
${endif}
"color":
${if_up wlan0}
"\#009900"
${else}
"\#990000"
${endif}
}
}, # <--- caused error
],
Run only conky and see if its output is a correct JSON.
Ah, thanks. It didn't liked the the big { } i've marked