Cannot pipe conky colors to i3bar using JSON, status doesn't get updated
I did exactly as it says in the documentation. I've struggled with this for two days many hours in a row. I have no experience with JSON so I don't know what I can do to fix it. I have the ~/.i3/conkyi3bar.sh which looks like this:
#!/bin/sh
echo '{ "version": 1 }'
echo '['
echo '[],'
exec conky -c $HOME/.i3/conkyi3rc
And this is the TEXT part from the conky script:
TEXT
[
{
"full_text": "K: $kernel",
"color": "\#BFBFBF"
},
{
"full_text": "A: $machine",
"color": "\#BFBFBF"
},
{
"full_text": "U: $uptime",
"color": "\#BFBFBF"
},
{
"full_text": "CU0: ${cpu cpu1}%",
"color":
${if_match ${cpu cpu1}>60}"\#FF0000"
${else}"\#BFBFBF"
${endif}
},
{
"full_text": "CU1: ${cpu cpu2}%",
"color":
${if_match ${cpu cpu2}>60}"\#FF0000"
${else}"\#BFBFBF"
${endif}
},
{
"full_text": "C0:${hwmon 1 temp 2}°C",
"color":
${if_match ${hwmon 1 temp 2}>45}"\#FF0000"
${else}"\#BFBFBF"
${endif}
},
{
"full_text": "C1:${hwmon 1 temp 3}°C",
"color":
${if_match ${hwmon 1 temp 3}>45}"\#FF0000"
${else}"\#BFBFBF"
${endif}
},
{
"full_text": "M: $memeasyfree / $memperc%",
"color":
${if_match ${memperc}>70}"\#FF0000"
${else}"\#BFBFBF"
${endif}
}
]
I wrote it like this to be easy to read (for me). At first I thought it may be the syntax, but I tried many ways. It made no difference. Without using the JSON protocol, the conky status gets piped without any problems, but I have to give up on colors. Maybe someone who knows JSON or the i3bar protocol better, can spot an error in my configs. I need a little help.
I'm using ArchLinux 64 bit with i3-git compiled yesterday in the hope that there will be something that can be fixed this way.