- // i wish...
- //PyRun_String("from _otk import *; from _openbox import *;", Py_file_input,
- // Py_None, Py_None);
- FILE *rcpyfd = fopen(_scriptfilepath.c_str(), "r");
- if (!rcpyfd) {
- printf("failed to load python file %s\n", _scriptfilepath.c_str());
- } else {
- PyRun_SimpleFile(rcpyfd, _scriptfilepath.c_str());
- fclose(rcpyfd);
- }
+ PyRun_SimpleString("from _otk import *; from _openbox import *;");
+ PyRun_SimpleString("openbox = Openbox_instance()");
+
+ runPython(SCRIPTDIR"/clientmotion.py"); // moving and resizing clients
+ runPython(SCRIPTDIR"/clicks.py"); // titlebar/root clicks and dblclicks
+ runPython(_scriptfilepath.c_str());