// load config values
python_exec(SCRIPTDIR"/config.py"); // load openbox config values
// run all of the python scripts
-// python_exec(SCRIPTDIR"/clientmotion.py"); // moving and resizing clients
-// python_exec(SCRIPTDIR"/clicks.py"); // titlebar/root clicks and dblclicks
+ python_exec(SCRIPTDIR"/builtins.py"); // builtin callbacks
// run the user's script
python_exec(_scriptfilepath.c_str());
}
}
+void Openbox::execute(int screen, const std::string &bin)
+{
+#ifdef __EMX__
+ // XXX: whats this for? windows?
+ spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", bin.c_str(), NULL);
+#else // __EMX__
+ if (screen >= ScreenCount(otk::OBDisplay::display))
+ screen = 0;
+ const std::string &dstr =
+ otk::OBDisplay::screenInfo(screen)->displayString();
+
+ if (! fork()) {
+ setsid();
+ int ret = putenv(const_cast<char *>(dstr.c_str()));
+ assert(ret != -1);
+ ret = execl("/bin/sh", "/bin/sh", "-c", bin.c_str(), NULL);
+ exit(ret);
+ }
+#endif // __EMX__
+}
+
}