Autostart program in specific workspace

After upgrading Qubes OS to 4.3 I’m now using xdotool, wmctrl and xprop and put everything I did with devilspie2 before in a single script, with a keyboard shortcut assigned. So it’s just a single keyboard shortcut to move all windows to the desired workspace, position, size, etc.

Examples can be found e.g. in the following forum topics:

xdotool also has a behave command which can run a command or script automatically, like

xdotool search --class <searchstring> behave %@ focus sleep 3 exec --sync /path/to/your/script

This way the script runs every time a window is focused, though, and not only when a window is created.