aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/wm/arg.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-29 10:54:50 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-29 10:54:50 -0700
commitd20be3112770c9fd252c91306675717dcb59e28f (patch)
tree91e41d2ff8e9bb82363eb0faeace9218263beede /sys/cmd/wm/arg.c
parent88b8c199e3524b7c4e2667db3683c77d70f34a26 (diff)
chore(wm): add forgotten files
Diffstat (limited to 'sys/cmd/wm/arg.c')
-rw-r--r--sys/cmd/wm/arg.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/cmd/wm/arg.c b/sys/cmd/wm/arg.c
new file mode 100644
index 0000000..bf58534
--- /dev/null
+++ b/sys/cmd/wm/arg.c
@@ -0,0 +1,21 @@
+#include "wm.h"
+
+void
+spawn(Arg *arg)
+{
+ if(!fork()) {
+ dup2(2, 1);
+ setsid();
+ execvp(((char **)arg->v)[0], (char **)arg->v);
+ }
+}
+
+void
+quit(Arg *arg)
+{
+ wl_display_terminate(server.display);
+}
+
+#define CONFIG(a,b,...) a cfg·##b = __VA_ARGS__
+#include "config.h"
+#undef CONFIG