- _cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr);
- _cursors.move = XCreateFontCursor(otk::OBDisplay::display, XC_fleur);
- _cursors.ll_angle = XCreateFontCursor(otk::OBDisplay::display, XC_ll_angle);
- _cursors.lr_angle = XCreateFontCursor(otk::OBDisplay::display, XC_lr_angle);
- _cursors.ul_angle = XCreateFontCursor(otk::OBDisplay::display, XC_ul_angle);
- _cursors.ur_angle = XCreateFontCursor(otk::OBDisplay::display, XC_ur_angle);
-
- // start up python and run the user's startup script
- Py_SetProgramName(argv[0]);
- Py_Initialize();
- init_otk();
- init_openbox();
- 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());
-
+ _cursors.session = XCreateFontCursor(**otk::display, XC_left_ptr);
+ _cursors.move = XCreateFontCursor(**otk::display, XC_fleur);
+ _cursors.ll_angle = XCreateFontCursor(**otk::display, XC_ll_angle);
+ _cursors.lr_angle = XCreateFontCursor(**otk::display, XC_lr_angle);
+ _cursors.ul_angle = XCreateFontCursor(**otk::display, XC_ul_angle);
+ _cursors.ur_angle = XCreateFontCursor(**otk::display, XC_ur_angle);
+
+ // 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"/builtins.py"); // builtin callbacks
+ //python_exec(SCRIPTDIR"/focus.py"); // focus helpers
+ // run the user's script or the system defaults if that fails
+ if (!python_exec(_scriptfilepath.c_str()))
+ python_exec(SCRIPTDIR"/defaults.py"); // system default bahaviors
+