If you are using workspaces (called viewports in Compiz), you can use devilspie2 to open applications maximalized in a different workspace. It uses lua as its scripting language so it is quite powerfull. It does not work that well with viewports as they are technically only a section of one big workspace, so some workarounds and external tools are needed. This is a script I use to place pidign conversation to viewport 3,3 (third from the top and left) of my fullHD screen (1920×1080):
-- a helper function to capture string from external command output
function os.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if raw then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end
if (get_window_class()=="Pidgin" and get_window_role()=="conversation") then
-- get the current viewport
vp = os.capture("xprop -root |grep '_NET_DESKTOP_VIEWPORT(CARDINAL) = ' |cut -d ' ' -f 3-4 |tr -d ','")
-- unfortunately, the below does not work due to a bug in xdotool
-- vp = os.capture("xdotool get_desktop_viewport")
-- set_window_geomtery is relative to current position, it seems, so go to the left and top most vieport
os.execute("xdotool set_desktop_viewport 0 0")
-- set the window maximized and to viewport 3,3
set_window_geometry(3930,2250,650,950)
maximize()
-- now go to the original viewport
os.execute("xdotool set_desktop_viewport " .. vp)
end
The script depends on x11-utils
and xdotool
. It results in a very short flicker when the app is open. It can be eliminated by using CCSM and setting Wall sliding duration time to zero milliseconds.
~/.local/share/applications
. Are you willing to do this? If not, try using Devilspie. Some good instructions are here in this question, which is the exact opposite of yours.