There isn't any especially easy way to do it, my suggest would be to install devilspie2
and write some Lua scripts (they're really easy, I have them for several apps, I can give some examples below) and just have devilspie2 launch on startup (if you're using Budgie, you can go to Budgie Desktop Settings via Budgie Menu, go to Autostart, then create a "custom command" that runs it). You can immediately launch it by just running devilspie2 &!
then press Ctrl+D
in the Terminal to detach from that devilspie2 process. For debugging, kill the existing process using killall -9 devilspie2
and just run it normally from the Terminal devilspie2
. It'll stop when you Ctrl+C
it or close the Terminal though, so bear that in mind.
Examples
Discord
- Moving Discord to my right monitor, setting size of 800x600
if (get_window_class() == "discord") then -- Use WM_CLASS since title could be different
set_window_geometry(2320, 100, 800, 600) -- Set on right monitor, size 800x600
end
Into the Breach
- Undecorate window (removes window decorations)
- Unshade (remove titlebar)
- Sets window geometry to be the same as my primary monitor (1920x1080) at position x, y of 0 (starts at top left)
- Sets to fullscreen
if (get_window_name() == "Into the Breach") then
undecorate_window()
unshade()
set_window_geometry(0,0,1920,1080)
set_window_fullscreen(true)
end
Getting Window Information
Install xprop
from the repository, launch the window and a Terminal, type xprop
into the Terminal then click on the other window. You'll get a bunch of information, useful bits are:
WM_CLASS
(window manager class)
WM_NAME
(window name)
I'd suggest using the window manager class and get_window_class()
over WM_NAME
since it is not going to change for most cases.