Is there a way for budgie to remember which monitor to launch something in?

Is there a way to have applications always open in a specific monitor (in a dual monitor setup)?

It seems like apps only ever open in the primary monitor. Perhaps that’s by design but I was curious if there’s a way to have budgie “remember” which monitor last had the app and open new instances there.

You can use wmctrl to position them after they’ve opened. Check out this thread…

https://discourse.ubuntubudgie.org/t/how-to-restore-session-after-login/8000

In your autostart setup, you can have a single script run that can be edited to add new wmctrl commands (or calls to a helper script like that listed on the above linked thread). And as you have a dual monitor setup you may also find this comment of mine on reddit somewhat useful…

https://www.reddit.com/r/gnome/comments/1m276qo/comment/n3u5y2u/

Finally, you can alter the desktop launcher for an application so that when you click its icon in the menu or dock, this placing of the app on the correct monitor happens automatically. I do this for my clock application. Here’s the contents of its desktop launcher…

[Desktop Entry]
Encoding=UTF-8
Type=Application
Comment=Display analog clock
Exec=/home/bwblock/.local/bin/launch-and-place-clockmaker
Icon=/usr/share/icons/clockmaker.png
StartupNotify=true
Terminal=false
Name=ClockMaker
Categories=Utility;Clock;
Actions=new-window;

[Desktop Action new-window]
Name=New Window
Exec=/home/bwblock/.local/bin/launch-and-place-clockmaker

And the “launch-and-place-clockmaker” script looks like this…

#!/bin/bash
clockmaker --size 256 &
sleep 1
placeapp -w “ClockMaker” 3150 245 -1 -1

Note that this script calls the helper script “placeapp” which actually makes the call to wmctrl.

Hope this helps.

Regarding my prior comment, I should add that wmctrl is only an X11 solution and it won’t work on Wayland. :woozy_face:

Every compositor does things slightly differently.

So for labwc you can add a window rule such as

<windowRules>

<!-- Example: Open Firefox on the second monitor (e.g., HDMI-A-2) -->

<windowRule app_id="firefox">

<action name="MoveToOutput" output="HDMI-A-2" />

</windowRule>

</windowRules>

Note - you can get very creative with actions - e.g. moving things to different workspaces etc