sway-toolwait: Tame Your Autostart App Layout
TL;DR Use sway-toolwait to control the layout and workspace of your autostart apps. Introduction I used to have the following in ~/.config/sway/config.d/autostart_applications: swaymsg "workspace number 1" swaymsg "exec flatpak run --env=OBSIDIAN_USE_WAYLAND=1 md.obsidian.Obsidian" swaymsg "exec kitty" swaymsg "workspace number 2" swaymsg "exec firefox" swaymsg "workspace number 3" swaymsg "exec chromium --ozone-platform-hint=auto" swaymsg "exec kitty" swaymsg "workspace number 4" swaymsg "exec vieb --enable-features=UseOzonePlatform --ozone-platform=wayland" swaymsg "exec kitty" As you can see, I have 3 Chromium-based app. They take longer to launch than kitty, so kitty is launched before them and it messes up my layout. Somtimes they’d launch even in the wrong workspaces (e.g., sway would have switched to workspace 3 before done starting firefox in workspace 2, so firefox is in workspace 3) ...