Openbox sticky workspaces
A feature I find useful in a multi-monitor environment is the ability to pin a workspace to a specific monitor, so that some windows can follow you between workspaces.
Openbox doesn't have native support for this, but it is easy to achieve by making use of sticky windows, with a short devilspie2 script (~/.config/devilspie2/sticky_monitors.lua
):
-- runs whenever window is focused/blurred
-- monitor 1 is my main monitor, so this will pin all other monitors
if get_monitor_index() ~= 1 then
pin_window()
else
unpin_window()
end
You may also need the devilspie2.lua
main script:
scripts_window_focus = {
"sticky_monitors.lua",
}
scripts_window_blur = {
"sticky_monitors.lua",
}
Restart devilspie2 and you should find that windows are stickied and unstickied automatically as they are moved between the appropriate monitors.