diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-04-14 00:27:47 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-04-14 12:41:59 +0300 |
commit | 6961bf2e4ce2c116e41a8db158691f6c993707ce (patch) | |
tree | a381146599a5f19e565006cafeb23edc04247d2b /include/sway/swaynag.h | |
parent | swaynag: fix pointer management (diff) | |
download | sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.tar.gz sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.tar.zst sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.zip |
Spawn swaynag as a wayland client
This spawns swaynag as a wayland client similar to how swaybar and
swaybg are already done
Diffstat (limited to 'include/sway/swaynag.h')
-rw-r--r-- | include/sway/swaynag.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/sway/swaynag.h b/include/sway/swaynag.h index 5a178739..74d9ea18 100644 --- a/include/sway/swaynag.h +++ b/include/sway/swaynag.h | |||
@@ -1,9 +1,12 @@ | |||
1 | #ifndef _SWAY_SWAYNAG_H | 1 | #ifndef _SWAY_SWAYNAG_H |
2 | #define _SWAY_SWAYNAG_H | 2 | #define _SWAY_SWAYNAG_H |
3 | #include <wayland-server-core.h> | ||
3 | 4 | ||
4 | struct swaynag_instance { | 5 | struct swaynag_instance { |
6 | struct wl_client *client; | ||
7 | struct wl_listener client_destroy; | ||
8 | |||
5 | const char *args; | 9 | const char *args; |
6 | pid_t pid; | ||
7 | int fd[2]; | 10 | int fd[2]; |
8 | bool detailed; | 11 | bool detailed; |
9 | }; | 12 | }; |
@@ -15,9 +18,6 @@ struct swaynag_instance { | |||
15 | bool swaynag_spawn(const char *swaynag_command, | 18 | bool swaynag_spawn(const char *swaynag_command, |
16 | struct swaynag_instance *swaynag); | 19 | struct swaynag_instance *swaynag); |
17 | 20 | ||
18 | // Kill the swaynag instance | ||
19 | void swaynag_kill(struct swaynag_instance *swaynag); | ||
20 | |||
21 | // Write a log message to swaynag->fd[1]. This will fail when swaynag->detailed | 21 | // Write a log message to swaynag->fd[1]. This will fail when swaynag->detailed |
22 | // is false. | 22 | // is false. |
23 | void swaynag_log(const char *swaynag_command, struct swaynag_instance *swaynag, | 23 | void swaynag_log(const char *swaynag_command, struct swaynag_instance *swaynag, |