diff options
Diffstat (limited to 'sway/config/bar.c')
-rw-r--r-- | sway/config/bar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index b1aa2313..0fdac5d8 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c | |||
@@ -19,10 +19,10 @@ | |||
19 | #include "util.h" | 19 | #include "util.h" |
20 | 20 | ||
21 | static void terminate_swaybar(pid_t pid) { | 21 | static void terminate_swaybar(pid_t pid) { |
22 | wlr_log(WLR_DEBUG, "Terminating swaybar %d", pid); | 22 | sway_log(SWAY_DEBUG, "Terminating swaybar %d", pid); |
23 | int ret = kill(-pid, SIGTERM); | 23 | int ret = kill(-pid, SIGTERM); |
24 | if (ret != 0) { | 24 | if (ret != 0) { |
25 | wlr_log_errno(WLR_ERROR, "Unable to terminate swaybar %d", pid); | 25 | sway_log_errno(SWAY_ERROR, "Unable to terminate swaybar %d", pid); |
26 | } else { | 26 | } else { |
27 | int status; | 27 | int status; |
28 | waitpid(pid, &status, 0); | 28 | waitpid(pid, &status, 0); |
@@ -194,7 +194,7 @@ static void invoke_swaybar(struct bar_config *bar) { | |||
194 | // Pipe to communicate errors | 194 | // Pipe to communicate errors |
195 | int filedes[2]; | 195 | int filedes[2]; |
196 | if (pipe(filedes) == -1) { | 196 | if (pipe(filedes) == -1) { |
197 | wlr_log(WLR_ERROR, "Pipe setup failed! Cannot fork into bar"); | 197 | sway_log(SWAY_ERROR, "Pipe setup failed! Cannot fork into bar"); |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | ||
@@ -227,17 +227,17 @@ static void invoke_swaybar(struct bar_config *bar) { | |||
227 | execvp(cmd[0], cmd); | 227 | execvp(cmd[0], cmd); |
228 | exit(1); | 228 | exit(1); |
229 | } | 229 | } |
230 | wlr_log(WLR_DEBUG, "Spawned swaybar %d", bar->pid); | 230 | sway_log(SWAY_DEBUG, "Spawned swaybar %d", bar->pid); |
231 | close(filedes[0]); | 231 | close(filedes[0]); |
232 | size_t len; | 232 | size_t len; |
233 | if (read(filedes[1], &len, sizeof(size_t)) == sizeof(size_t)) { | 233 | if (read(filedes[1], &len, sizeof(size_t)) == sizeof(size_t)) { |
234 | char *buf = malloc(len); | 234 | char *buf = malloc(len); |
235 | if(!buf) { | 235 | if(!buf) { |
236 | wlr_log(WLR_ERROR, "Cannot allocate error string"); | 236 | sway_log(SWAY_ERROR, "Cannot allocate error string"); |
237 | return; | 237 | return; |
238 | } | 238 | } |
239 | if (read(filedes[1], buf, len)) { | 239 | if (read(filedes[1], buf, len)) { |
240 | wlr_log(WLR_ERROR, "%s", buf); | 240 | sway_log(SWAY_ERROR, "%s", buf); |
241 | } | 241 | } |
242 | free(buf); | 242 | free(buf); |
243 | } | 243 | } |
@@ -248,7 +248,7 @@ void load_swaybar(struct bar_config *bar) { | |||
248 | if (bar->pid != 0) { | 248 | if (bar->pid != 0) { |
249 | terminate_swaybar(bar->pid); | 249 | terminate_swaybar(bar->pid); |
250 | } | 250 | } |
251 | wlr_log(WLR_DEBUG, "Invoking swaybar for bar id '%s'", bar->id); | 251 | sway_log(SWAY_DEBUG, "Invoking swaybar for bar id '%s'", bar->id); |
252 | invoke_swaybar(bar); | 252 | invoke_swaybar(bar); |
253 | } | 253 | } |
254 | 254 | ||