------------------------------------------------------------------------------- openbox configuration files. You can use the XDG environment variables to change where Openbox looks for its config files. That is... $XDG_CONFIG_HOME defines the relative base directory to uses home. and defaults to $HOME/.config See http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html NOTE: This is the new standard configuration area for many UNIX applications. They are slowly migrating the multitue of 'dot' files from the top level HOME directory info .config sub-directory. ------------------------------------------------------------------------------- Including config from other files The top level tag can include xmlns:xi="http://www.w3.org/2001/XInclude" Which allows for XML files to include the contents of other XML files. https://en.wikipedia.org/wiki/XInclude https://thekondor.blogspot.com/2012/07/splitting-openbox-configuration-to.html ------------------------------------------------------------------------------- Environment Openbox will set extra environment variables from the file $HOME/.config/openbox/environment this is added to the environment present when openbox is launched ------------------------------------------------------------------------------- Preventing tilde expansion. A ~ in a command will be expanded by openbox to the the users home directory. This can make using it in arguments difficult. EG: echo ~~~ The solution is not to have a '~' (or use a later version of openbox) that is make it a bash script and use `printf '\176'` for the ~ bash -c "echo `printf '\176'`~~ It works but is messy. It should only be applied at the start of a argument. ------------------------------------------------------------------------------- Specific Window size and placement 0 0 600 1024 no no Note: the and need to be in the tag and placement and in a tag. To get the application information obxprop | grep "^_OB_APP" and click in the application window EG: _OB_APP_TYPE(UTF8_STRING) = "normal" _OB_APP_CLASS(UTF8_STRING) = "Emacs" _OB_APP_NAME(UTF8_STRING) = "emacs24" ------------------------------------------------------------------------------- Alt-Tab to select a window for focus openbox will skip windows with the SKIP_TASKBAR hint, or if it's non-focusable, etc. ------------------------------------------------------------------------------- Chroot Key bindings chroot allows you to nest keybindings under another keybinding. Once chroot is active it remains so until you leave chroot. (default is ctrl-g) The downsides to this are you will have a little box in the top left reminding you that you are in chroot mode, and your other keybindings will not be active (unless you copy them into the chroot). Some examples: I use this to disable all normal openbox keybinds. Useful if i need to alt-tab in vnc or something, Running various stuff that i don't use that often, to avoid eating up a lot of normal binds... gimp --pdb-compat-mode=on urxvt -name htop -e htop ... etc ... The reason I use chroot + breakchroot is just to avoid the timeout normal keychains have. ------------------------------------------------------------------------------- Remote Openbox Reconfigure (after rc or menu updates) Also stored at ~/store/X/c.src/openbox_reconfigure.c =======8<-------- /* ** Force Openbox to reconfigure. ** ** Extracted from obconf and posted on the openbox mailing list ** On 13 May 2010 11:21, Eric Bohlman ** Subject: [openbox] Forcing Openbox to reconfigure ** ** cc openbox_reconfigure.c -lX11 -o openbox_reconfigure */ #include #include main () { XEvent ce; Display *display=XOpenDisplay(NULL); int screen=DefaultScreen(display); Window root=RootWindow(display,screen); ce.xclient.type = ClientMessage; ce.xclient.message_type = XInternAtom(display,"_OB_CONTROL",0); ce.xclient.display = display; ce.xclient.window = root; ce.xclient.format = 32; ce.xclient.data.l[0] = 1; /* reconfigure */ ce.xclient.data.l[1] = 0; ce.xclient.data.l[2] = 0; ce.xclient.data.l[3] = 0; ce.xclient.data.l[4] = 0; XSendEvent(display,root,0, SubstructureNotifyMask | SubstructureRedirectMask, &ce); XFlush(display); } =======8<-------- ------------------------------------------------------------------------------- Alt-Tab to select a window for focus openbox will skip windows with the SKIP_TASKBAR hint, or if it's non-focusable, etc. -------------------------------------------------------------------------------