swaybar: fix whitespace

This commit is contained in:
progandy 2015-12-22 17:26:40 +01:00
parent 70b24fbb1f
commit d37169a927

View file

@ -425,25 +425,22 @@ void render() {
}
void parse_json(const char *text) {
/*
* {
"full_text": "E: 10.0.0.1 (1000 Mbit/s)",
"short_text": "10.0.0.1",
"color": "#00ff00",
"min_width": 300,
"align": "right",
"urgent": false,
"name": "ethernet",
"instance": "eth0",
"separator": true,
"separator_block_width": 9
}
*
*
*
* */
/* the array of objects looks like this:
* [ {
* "full_text": "E: 10.0.0.1 (1000 Mbit/s)",
* "short_text": "10.0.0.1",
* "color": "#00ff00",
* "min_width": 300,
* "align": "right",
* "urgent": false,
* "name": "ethernet",
* "instance": "eth0",
* "separator": true,
* "separator_block_width": 9
* },
* { ... }, ...
* ]
*/
json_object *results = json_tokener_parse(text);
if (!results) {
sway_log(L_DEBUG, "xxx Failed to parse json");
@ -466,7 +463,6 @@ void parse_json(const char *text) {
json_object *name, *instance, *separator, *separator_block_width;
json_object *json = json_object_array_get_idx(results, i);
if (!json) {
continue;
}
@ -538,11 +534,9 @@ void parse_json(const char *text) {
}
list_add(status_line, new);
}
json_object_put(results);
}
void poll_for_update() {