- // start up python and run the user's startup script
- Py_SetProgramName(argv[0]);
- Py_Initialize();
- init_otk();
- init_openbox();
- // 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, const_cast<char*>(_scriptfilepath.c_str()));
- fclose(rcpyfd);
- }
-
+ // initialize scripting
+ python_init(argv[0]);
+
+ // 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
+ // run the user's script
+ python_exec(_scriptfilepath.c_str());
+