aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-01-05 22:32:51 +0100
committerDominique Martinet <asmadeus@codewreck.org>2018-01-05 23:39:46 +0100
commit67985e903188a464e602d04f9ed218bd397f5ab1 (patch)
tree3589175749c9a2ed746b0cc280ab3ccfb33125e9 /sway/commands
parentfdc92e745498a4e0707a51c3fd3390d462e9ae59 (diff)
sway: change all sway_log to wlr_log
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/bind.c8
-rw-r--r--sway/commands/exec.c2
-rw-r--r--sway/commands/exec_always.c8
-rw-r--r--sway/commands/input.c2
-rw-r--r--sway/commands/input/click_method.c2
-rw-r--r--sway/commands/input/events.c2
-rw-r--r--sway/commands/input/tap.c4
-rw-r--r--sway/commands/input/xkb_layout.c4
-rw-r--r--sway/commands/input/xkb_model.c4
-rw-r--r--sway/commands/input/xkb_options.c4
-rw-r--r--sway/commands/input/xkb_rules.c4
-rw-r--r--sway/commands/input/xkb_variant.c4
-rw-r--r--sway/commands/output.c8
-rw-r--r--sway/commands/seat.c2
-rw-r--r--sway/commands/set.c2
15 files changed, 30 insertions, 30 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 79121404..cbabb07b 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -145,7 +145,7 @@ struct cmd_results *cmd_bindsym(int argc, char **argv) {
for (int i = 0; i < mode_bindings->length; ++i) {
struct sway_binding *config_binding = mode_bindings->items[i];
if (binding_key_compare(binding, config_binding)) {
- sway_log(L_DEBUG, "overwriting old binding with command '%s'",
+ wlr_log(L_DEBUG, "overwriting old binding with command '%s'",
config_binding->command);
free_sway_binding(config_binding);
mode_bindings->items[i] = binding;
@@ -157,7 +157,7 @@ struct cmd_results *cmd_bindsym(int argc, char **argv) {
list_add(mode_bindings, binding);
}
- sway_log(L_DEBUG, "bindsym - Bound %s to command %s",
+ wlr_log(L_DEBUG, "bindsym - Bound %s to command %s",
argv[0], binding->command);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
@@ -227,7 +227,7 @@ struct cmd_results *cmd_bindcode(int argc, char **argv) {
for (int i = 0; i < mode_bindings->length; ++i) {
struct sway_binding *config_binding = mode_bindings->items[i];
if (binding_key_compare(binding, config_binding)) {
- sway_log(L_DEBUG, "overwriting old binding with command '%s'",
+ wlr_log(L_DEBUG, "overwriting old binding with command '%s'",
config_binding->command);
free_sway_binding(config_binding);
mode_bindings->items[i] = binding;
@@ -239,7 +239,7 @@ struct cmd_results *cmd_bindcode(int argc, char **argv) {
list_add(mode_bindings, binding);
}
- sway_log(L_DEBUG, "bindcode - Bound %s to command %s",
+ wlr_log(L_DEBUG, "bindcode - Bound %s to command %s",
argv[0], binding->command);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/exec.c b/sway/commands/exec.c
index fbbc4941..363d5bef 100644
--- a/sway/commands/exec.c
+++ b/sway/commands/exec.c
@@ -8,7 +8,7 @@ struct cmd_results *cmd_exec(int argc, char **argv) {
if (!config->active) return cmd_results_new(CMD_DEFER, "exec", NULL);
if (config->reloading) {
char *args = join_args(argv, argc);
- sway_log(L_DEBUG, "Ignoring 'exec %s' due to reload", args);
+ wlr_log(L_DEBUG, "Ignoring 'exec %s' due to reload", args);
free(args);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 9527a487..61870c51 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -20,7 +20,7 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) {
char *tmp = NULL;
if (strcmp((char*)*argv, "--no-startup-id") == 0) {
- sway_log(L_INFO, "exec switch '--no-startup-id' not supported, ignored.");
+ wlr_log(L_INFO, "exec switch '--no-startup-id' not supported, ignored.");
if ((error = checkarg(argc - 1, "exec_always", EXPECTED_MORE_THAN, 0))) {
return error;
}
@@ -35,11 +35,11 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) {
strncpy(cmd, tmp, sizeof(cmd));
cmd[sizeof(cmd) - 1] = 0;
free(tmp);
- sway_log(L_DEBUG, "Executing %s", cmd);
+ wlr_log(L_DEBUG, "Executing %s", cmd);
int fd[2];
if (pipe(fd) != 0) {
- sway_log(L_ERROR, "Unable to create pipe for fork");
+ wlr_log(L_ERROR, "Unable to create pipe for fork");
}
pid_t pid;
@@ -75,7 +75,7 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) {
// cleanup child process
wait(0);
if (*child > 0) {
- sway_log(L_DEBUG, "Child process created with pid %d", *child);
+ wlr_log(L_DEBUG, "Child process created with pid %d", *child);
// TODO: add PID to active workspace
} else {
free(child);
diff --git a/sway/commands/input.c b/sway/commands/input.c
index edf45e4c..5ea39f62 100644
--- a/sway/commands/input.c
+++ b/sway/commands/input.c
@@ -12,7 +12,7 @@ struct cmd_results *cmd_input(int argc, char **argv) {
if (config->reading && strcmp("{", argv[1]) == 0) {
current_input_config = new_input_config(argv[0]);
- sway_log(L_DEBUG, "entering input block: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "entering input block: %s", current_input_config->identifier);
return cmd_results_new(CMD_BLOCK_INPUT, NULL, NULL);
}
diff --git a/sway/commands/input/click_method.c b/sway/commands/input/click_method.c
index dcf64c1a..22eb15f7 100644
--- a/sway/commands/input/click_method.c
+++ b/sway/commands/input/click_method.c
@@ -6,7 +6,7 @@
#include "log.h"
struct cmd_results *input_cmd_click_method(int argc, char **argv) {
- sway_log(L_DEBUG, "click_method for device: %d %s",
+ wlr_log(L_DEBUG, "click_method for device: %d %s",
current_input_config==NULL, current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "click_method", EXPECTED_AT_LEAST, 1))) {
diff --git a/sway/commands/input/events.c b/sway/commands/input/events.c
index 8a74c11e..a1bfbacd 100644
--- a/sway/commands/input/events.c
+++ b/sway/commands/input/events.c
@@ -6,7 +6,7 @@
#include "log.h"
struct cmd_results *input_cmd_events(int argc, char **argv) {
- sway_log(L_DEBUG, "events for device: %s",
+ wlr_log(L_DEBUG, "events for device: %s",
current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "events", EXPECTED_AT_LEAST, 1))) {
diff --git a/sway/commands/input/tap.c b/sway/commands/input/tap.c
index 8547c0cd..ecab9a5b 100644
--- a/sway/commands/input/tap.c
+++ b/sway/commands/input/tap.c
@@ -6,7 +6,7 @@
#include "log.h"
struct cmd_results *input_cmd_tap(int argc, char **argv) {
- sway_log(L_DEBUG, "tap for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "tap for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "tap", EXPECTED_AT_LEAST, 1))) {
return error;
@@ -26,7 +26,7 @@ struct cmd_results *input_cmd_tap(int argc, char **argv) {
"Expected 'tap <enabled|disabled>'");
}
- sway_log(L_DEBUG, "apply-tap for device: %s",
+ wlr_log(L_DEBUG, "apply-tap for device: %s",
current_input_config->identifier);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/input/xkb_layout.c b/sway/commands/input/xkb_layout.c
index a25d3850..25db1a33 100644
--- a/sway/commands/input/xkb_layout.c
+++ b/sway/commands/input/xkb_layout.c
@@ -5,7 +5,7 @@
#include "log.h"
struct cmd_results *input_cmd_xkb_layout(int argc, char **argv) {
- sway_log(L_DEBUG, "xkb layout for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "xkb layout for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "xkb_layout", EXPECTED_EQUAL_TO, 1))) {
return error;
@@ -18,7 +18,7 @@ struct cmd_results *input_cmd_xkb_layout(int argc, char **argv) {
new_config->xkb_layout = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_layout for device: %s layout: %s",
+ wlr_log(L_DEBUG, "apply-xkb_layout for device: %s layout: %s",
current_input_config->identifier, new_config->xkb_layout);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/input/xkb_model.c b/sway/commands/input/xkb_model.c
index 9729e869..819b796b 100644
--- a/sway/commands/input/xkb_model.c
+++ b/sway/commands/input/xkb_model.c
@@ -5,7 +5,7 @@
#include "log.h"
struct cmd_results *input_cmd_xkb_model(int argc, char **argv) {
- sway_log(L_DEBUG, "xkb model for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "xkb model for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "xkb_model", EXPECTED_EQUAL_TO, 1))) {
return error;
@@ -18,7 +18,7 @@ struct cmd_results *input_cmd_xkb_model(int argc, char **argv) {
new_config->xkb_model = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_model for device: %s model: %s",
+ wlr_log(L_DEBUG, "apply-xkb_model for device: %s model: %s",
current_input_config->identifier, new_config->xkb_model);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c
index 504849cc..ff5f83ec 100644
--- a/sway/commands/input/xkb_options.c
+++ b/sway/commands/input/xkb_options.c
@@ -5,7 +5,7 @@
#include "log.h"
struct cmd_results *input_cmd_xkb_options(int argc, char **argv) {
- sway_log(L_DEBUG, "xkb options for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "xkb options for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "xkb_options", EXPECTED_EQUAL_TO, 1))) {
return error;
@@ -18,7 +18,7 @@ struct cmd_results *input_cmd_xkb_options(int argc, char **argv) {
new_config->xkb_options = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_options for device: %s options: %s",
+ wlr_log(L_DEBUG, "apply-xkb_options for device: %s options: %s",
current_input_config->identifier, new_config->xkb_options);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/input/xkb_rules.c b/sway/commands/input/xkb_rules.c
index db7d8abe..aafe0003 100644
--- a/sway/commands/input/xkb_rules.c
+++ b/sway/commands/input/xkb_rules.c
@@ -5,7 +5,7 @@
#include "log.h"
struct cmd_results *input_cmd_xkb_rules(int argc, char **argv) {
- sway_log(L_DEBUG, "xkb rules for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "xkb rules for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "xkb_rules", EXPECTED_EQUAL_TO, 1))) {
return error;
@@ -18,7 +18,7 @@ struct cmd_results *input_cmd_xkb_rules(int argc, char **argv) {
new_config->xkb_rules = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_rules for device: %s rules: %s",
+ wlr_log(L_DEBUG, "apply-xkb_rules for device: %s rules: %s",
current_input_config->identifier, new_config->xkb_rules);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/input/xkb_variant.c b/sway/commands/input/xkb_variant.c
index 855e6abc..89a61fdc 100644
--- a/sway/commands/input/xkb_variant.c
+++ b/sway/commands/input/xkb_variant.c
@@ -5,7 +5,7 @@
#include "log.h"
struct cmd_results *input_cmd_xkb_variant(int argc, char **argv) {
- sway_log(L_DEBUG, "xkb variant for device: %s", current_input_config->identifier);
+ wlr_log(L_DEBUG, "xkb variant for device: %s", current_input_config->identifier);
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "xkb_variant", EXPECTED_EQUAL_TO, 1))) {
return error;
@@ -18,7 +18,7 @@ struct cmd_results *input_cmd_xkb_variant(int argc, char **argv) {
new_config->xkb_variant = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_variant for device: %s variant: %s",
+ wlr_log(L_DEBUG, "apply-xkb_variant for device: %s variant: %s",
current_input_config->identifier, new_config->xkb_variant);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/output.c b/sway/commands/output.c
index 8c0fa63c..e747eb4e 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -203,12 +203,12 @@ static struct cmd_results *cmd_output_background(struct output_config *output,
if (src) {
sprintf(src, "%s/%s", conf_path, p.we_wordv[0]);
} else {
- sway_log(L_ERROR,
+ wlr_log(L_ERROR,
"Unable to allocate background source");
}
free(conf);
} else {
- sway_log(L_ERROR, "Unable to allocate background source");
+ wlr_log(L_ERROR, "Unable to allocate background source");
}
}
if (!src || access(src, F_OK) == -1) {
@@ -238,7 +238,7 @@ struct cmd_results *cmd_output(int argc, char **argv) {
struct output_config *output = new_output_config(argv[0]);
if (!output) {
- sway_log(L_ERROR, "Failed to allocate output config");
+ wlr_log(L_ERROR, "Failed to allocate output config");
return NULL;
}
@@ -284,7 +284,7 @@ struct cmd_results *cmd_output(int argc, char **argv) {
list_add(config->output_configs, output);
}
- sway_log(L_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz "
+ wlr_log(L_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz "
"position %d,%d scale %f transform %d) (bg %s %s)",
output->name, output->enabled, output->width, output->height,
output->refresh_rate, output->x, output->y, output->scale,
diff --git a/sway/commands/seat.c b/sway/commands/seat.c
index 155bc510..6284002b 100644
--- a/sway/commands/seat.c
+++ b/sway/commands/seat.c
@@ -12,7 +12,7 @@ struct cmd_results *cmd_seat(int argc, char **argv) {
if (config->reading && strcmp("{", argv[1]) == 0) {
current_seat_config = new_seat_config(argv[0]);
- sway_log(L_DEBUG, "entering seat block: %s", current_seat_config->name);
+ wlr_log(L_DEBUG, "entering seat block: %s", current_seat_config->name);
return cmd_results_new(CMD_BLOCK_SEAT, NULL, NULL);
}
diff --git a/sway/commands/set.c b/sway/commands/set.c
index dcd928ba..856c73e7 100644
--- a/sway/commands/set.c
+++ b/sway/commands/set.c
@@ -33,7 +33,7 @@ struct cmd_results *cmd_set(int argc, char **argv) {
}
if (argv[0][0] != '$') {
- sway_log(L_INFO, "Warning: variable '%s' doesn't start with $", argv[0]);
+ wlr_log(L_INFO, "Warning: variable '%s' doesn't start with $", argv[0]);
size_t size = snprintf(NULL, 0, "$%s", argv[0]);
tmp = malloc(size + 1);