summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-04-14 00:27:47 -0400
committerFurkan Sahin <furkan-dev@proton.me>2019-04-14 00:27:47 -0400
commitce9e7e0526affc72f00e9476f26e610d7c8c6339 (patch)
treea381146599a5f19e565006cafeb23edc04247d2b /include
parentd5e2676d9f01789427ac8ec7c5b0320c18c6f7a8 (diff)
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')
-rw-r--r--include/sway/swaynag.h8
-rw-r--r--include/util.h2
2 files changed, 6 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 @@
#ifndef _SWAY_SWAYNAG_H
#define _SWAY_SWAYNAG_H
+#include <wayland-server-core.h>
struct swaynag_instance {
+ struct wl_client *client;
+ struct wl_listener client_destroy;
+
const char *args;
- pid_t pid;
int fd[2];
bool detailed;
};
@@ -15,9 +18,6 @@ struct swaynag_instance {
bool swaynag_spawn(const char *swaynag_command,
struct swaynag_instance *swaynag);
-// Kill the swaynag instance
-void swaynag_kill(struct swaynag_instance *swaynag);
-
// Write a log message to swaynag->fd[1]. This will fail when swaynag->detailed
// is false.
void swaynag_log(const char *swaynag_command, struct swaynag_instance *swaynag,
diff --git a/include/util.h b/include/util.h
index 6a668fd6..6d9454e0 100644
--- a/include/util.h
+++ b/include/util.h
@@ -32,4 +32,6 @@ float parse_float(const char *value);
const char *sway_wl_output_subpixel_to_string(enum wl_output_subpixel subpixel);
+bool set_cloexec(int fd, bool cloexec);
+
#endif