This commit is contained in:
emersion 2018-07-09 22:54:30 +01:00
parent ebcdce457a
commit 63b4bf5000
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
85 changed files with 391 additions and 385 deletions

View file

@ -46,7 +46,7 @@ static void swaybar_output_free(struct swaybar_output *output) {
if (!output) {
return;
}
wlr_log(L_DEBUG, "Removing output %s", output->name);
wlr_log(WLR_DEBUG, "Removing output %s", output->name);
zwlr_layer_surface_v1_destroy(output->layer_surface);
wl_surface_destroy(output->surface);
wl_output_destroy(output->output);

View file

@ -31,7 +31,7 @@ static bool i3bar_parse_json(struct status_line *status, const char *text) {
status_error(status, "[failed to parse i3bar json]");
return false;
}
wlr_log(L_DEBUG, "Got i3bar json: '%s'", text);
wlr_log(WLR_DEBUG, "Got i3bar json: '%s'", text);
for (size_t i = 0; i < json_object_array_length(results); ++i) {
json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
json_object *name, *instance, *separator, *separator_block_width;
@ -193,7 +193,7 @@ bool i3bar_handle_readable(struct status_line *status) {
void i3bar_block_send_click(struct status_line *status,
struct i3bar_block *block, int x, int y, uint32_t button) {
wlr_log(L_DEBUG, "block %s clicked", block->name ? block->name : "(nil)");
wlr_log(WLR_DEBUG, "block %s clicked", block->name ? block->name : "(nil)");
if (!block->name || !status->i3bar_state.click_events) {
return;
}

View file

@ -327,7 +327,7 @@ bool handle_ipc_readable(struct swaybar *bar) {
json_object *result = json_tokener_parse(resp->payload);
if (!result) {
free_ipc_response(resp);
wlr_log(L_ERROR, "failed to parse payload as json");
wlr_log(WLR_ERROR, "failed to parse payload as json");
return false;
}
json_object *json_change, *json_pango_markup;
@ -340,7 +340,7 @@ bool handle_ipc_readable(struct swaybar *bar) {
bar->config->mode = strdup(change);
}
} else {
wlr_log(L_ERROR, "failed to parse response");
wlr_log(WLR_ERROR, "failed to parse response");
json_object_put(result);
free_ipc_response(resp);
return false;

View file

@ -75,13 +75,13 @@ int main(int argc, char **argv) {
}
if (debug) {
wlr_log_init(L_DEBUG, NULL);
wlr_log_init(WLR_DEBUG, NULL);
} else {
wlr_log_init(L_ERROR, NULL);
wlr_log_init(WLR_ERROR, NULL);
}
if (!bar_id) {
wlr_log(L_ERROR, "No bar_id passed. "
wlr_log(WLR_ERROR, "No bar_id passed. "
"Provide --bar_id or let sway start swaybar");
return 1;
}
@ -89,7 +89,7 @@ int main(int argc, char **argv) {
if (!socket_path) {
socket_path = get_socketpath();
if (!socket_path) {
wlr_log(L_ERROR, "Unable to retrieve socket path");
wlr_log(WLR_ERROR, "Unable to retrieve socket path");
return 1;
}
}

View file

@ -49,14 +49,14 @@ bool status_handle_readable(struct status_line *status) {
json_object *version;
if (json_object_object_get_ex(proto, "version", &version)
&& json_object_get_int(version) == 1) {
wlr_log(L_DEBUG, "Switched to i3bar protocol.");
wlr_log(WLR_DEBUG, "Switched to i3bar protocol.");
status->protocol = PROTOCOL_I3BAR;
}
json_object *click_events;
if (json_object_object_get_ex(
proto, "click_events", &click_events)
&& json_object_get_boolean(click_events)) {
wlr_log(L_DEBUG, "Enabled click events.");
wlr_log(WLR_DEBUG, "Enabled click events.");
status->i3bar_state.click_events = true;
const char *events_array = "[\n";
ssize_t len = strlen(events_array);
@ -91,7 +91,7 @@ struct status_line *status_line_init(char *cmd) {
int pipe_read_fd[2];
int pipe_write_fd[2];
if (pipe(pipe_read_fd) != 0 || pipe(pipe_write_fd) != 0) {
wlr_log(L_ERROR, "Unable to create pipes for status_command fork");
wlr_log(WLR_ERROR, "Unable to create pipes for status_command fork");
exit(1);
}