aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/wm/arg.c
diff options
context:
space:
mode:
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