-#include <stdc.h>
-#include <utf.h>
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xft/Xft.h>
+#include <x11.h>
#include <unistd.h>
+Atom XA_REGISTRAR, XA_OPEN;
+
+void start_registrar(XConf* x) {
+ /* launch registrar if it isn't yet running */
+ if (None == XGetSelectionOwner(x.display, XA_REGISTRAR)) {
+ puts("launching registrart");
+ if (!fork()) {
+ char* cmd[] = {"registrar", NULL};
+ exit(execvp(cmd[0], cmd));
+ }
+ }
+}
+
int main(int argc, char** argv) {
- return 0;
+ XConf x;
+ x11_init(&x);
+ x11_mkwin(&x, 1, 1, 0);
+ XA_REGISTRAR = XInternAtom(x.display, "TIDE_REGISTRAR", 0);
+ XA_OPEN = XInternAtom(x.display, "OPEN", 0);
+ start_registrar(&x);
+ /*
+ Loop over files and send and OPEN message for each one.
+ */
+ return 1;
}
+
+
+
+
+
+
+
#if 0
struct {
Display* display;