The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

i3statusbar

asked May 11 '14

i-sty gravatar image

My code: "{ "fulltext" : "RAM: ${mem}" , "color" : ${ifmatch ${memperc}>80}"#aa1515"${else}${if_match ${memperc}>60}"#c9b400"${else}"#56944e"${endif}}, "

When the memperc is over 80% I got this red text in the bar: "Error: Could not parse JSON (parse error: after key and value, inside map, I except ',' or '}')"

What's wrong with my setup?

1 answer

Sort by » oldest newest most voted
0

answered May 12 '14

joepd gravatar image

You open two if_match-es, so you should also close both. Whether that solves your problem, I have not tested. In general, it will help if you use newlines and indentation. It is surprising how helpful that is to spot syntactical errors.

Comments

Thank you joepd! That solved my problem!

i-sty gravatar imagei-sty (May 12 '14)edit

Question Tools

Stats

Asked: May 11 '14

Seen: 222 times

Last updated: May 12 '14