diff options
author | 2018-03-31 00:10:20 -0400 | |
---|---|---|
committer | 2018-03-31 00:10:20 -0400 | |
commit | 0441d124799dca510b3bf6621267b7838730af1a (patch) | |
tree | d5301c12dec48b570cee5d0a6daa3333ff4f575d /swaybar/ipc.c | |
parent | Use wlr_surface_point_accepts_input (diff) | |
parent | Implement workspace switch on click (diff) | |
download | sway-0441d124799dca510b3bf6621267b7838730af1a.tar.gz sway-0441d124799dca510b3bf6621267b7838730af1a.tar.zst sway-0441d124799dca510b3bf6621267b7838730af1a.zip |
Merge pull request #1676 from swaywm/swaybar-input
Swaybar input
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r-- | swaybar/ipc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index 326f25cc..64583df0 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c | |||
@@ -8,6 +8,14 @@ | |||
8 | #include "swaybar/ipc.h" | 8 | #include "swaybar/ipc.h" |
9 | #include "ipc-client.h" | 9 | #include "ipc-client.h" |
10 | 10 | ||
11 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws) { | ||
12 | const char *fmt = "workspace \"%s\""; | ||
13 | uint32_t size = snprintf(NULL, 0, fmt, ws); | ||
14 | char command[size]; | ||
15 | snprintf(command, size, fmt, ws); | ||
16 | ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size); | ||
17 | } | ||
18 | |||
11 | char *parse_font(const char *font) { | 19 | char *parse_font(const char *font) { |
12 | char *new_font = NULL; | 20 | char *new_font = NULL; |
13 | if (strncmp("pango:", font, 6) == 0) { | 21 | if (strncmp("pango:", font, 6) == 0) { |