I finally got my sway layout to autostart the way I like it

(hugues.betakappaphi.com)

36 points | by __hugues 3 days ago ago

8 comments

  • akimbostrawman 2 days ago

    Autostart management is one of the few things I dislike about sway. Over a longer period of trial and error i managed to create a sway config with sleeps to exactly get the kind of layout i want with 10 workspaces and about a dozen apps with some needing to be started in a specific order to properly function.

    Only downside is that I have to wait about 45 seconds after login to do anything or else the layout gets screwed up and the window focus gets hijacked by new spawning apps and workspaces.

    It seems this method also has those issues.

    • __hugues 2 days ago

      45s? how long do your apps take to start? what dependencies exist between your apps?

      sway-layout does not enforce any dependencies between apps. everything is started concurrently, so unless your apps manage their own interdependencies, it's not going to work

      on the other hand, that means the initial wait should be much shorter

      one potential avenue you could explore might be to configure a headless output, and try to have your slow starting apps/workspaces anchored there until they are ready. I haven't trie it though...

      • akimbostrawman a day ago

        Its less that they need 45s to start and more that there needs to be some leeway in case they for whatever reason take couple seconds longer to not screw up the layout. For 10 application a per app sleep of only 3 seconds is already 30 seconds. I will see if this tool might work for me tho.

  • tombert 3 days ago

    I’ve been running Sway full time for about a year. I like it, but out of the box it kind of feels incomplete.

    This isn’t a huge issue for me, and I did have a lot of fun overengineering my Swaybar, but I still think it should at least optionally come with some sensible default, like the system clock being added by default.

    • awithrow 3 days ago

      Agreed, it's a bit sparse but setting it up was a lot of fun. Made me realize just how much work goes on behind the scenes for something like gnome to tie everything together.

      On the plus side, I've gotten a much better understanding of all the moving pieces under the hood. It's also been a good excuse to migrate to some new tools which spark more joy than the old ones

      • tombert 3 days ago

        Oh no argument there. I had a lot of fun reinventing scheduling systems and minimizing memory usage [1], and I have gotten Sway into a state that I really really like. I have customized modal Vim-style keystrokes, and I've created my own program program to look through currently opened windows. [2]

        I probably wouldn't try to sell my parents on it though.

        [1] https://git.sr.ht/~tombert/swaybar3

        [2] https://git.sr.ht/~tombert/rs-sway-prog-switch

  • smnc 3 days ago

    I've wanted this for i3, but I guess I wasn't sufficiently motivated :) Given that sway's homepage describes it as a drop-in replacement for i3, I'll try it out tomorrow.

  • KarenDaBass 3 days ago

    [flagged]