I have been using sway (basically i3 for Wayland) instead of a traditional desktop environment because it really makes a difference in my laptops performance.

But apparently sway ignores .desktop files which was how i was autostarting things on KDE.

Is the best way to handle this by going through the sway config? If not, how would you do it.

Bonus points if you can tell me how to get the autostart programs to also open in specific workspaces.

  • HammerheartOP
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    In case this thread turns up a google search, or anyone is keeping score, I think I more or less managed to achieve what I wanted by putting this is in my config:

    assign [class="Firefox-esr"]  "2"
    exec wezterm -e cmus
     exec swaymsg [app_id="org.wezfurlong.wezterm"] focus
     exec swaymsg move container to workspace "10"
     exec firefox
    

    the only thing i don’t love is that if quit cmus, it closes the window instead of bringing me back to the shell. maybe i have so chain commands or something, i don’t know. i’m happy to have made it this far. Another thing is I don’t know if it’s possible to distinguish between the specific instance of wezterm that’s running cmus, and the other one i want running on workspace 1.