1. 42
    1. 15

      Doesn’t really paint sway in a bad picture, but wow does it sound complicated to replicate your X working environment with wayland… Still…

      1. 8

        I think part of it is that many of the Wayland tools aren’t yet packaged for Ubuntu (or are outdated), so you need to compile them from source. Also, you probably took some time to setup your i3 environment as well, similarly setting up Sway will take some time too (you can just copy-paste your i3 config, but you’ll need to do the work for the rest of your tools).

        1. 5

          But that’s exactly what I meant.

          I actually don’t use a lot of i3-specific tooling. One i3-addon and dmenu and the bar. So everything that was described is “Linux GUI stuff” for me, like xdotool (I hardly use it) - so X applications and tools. I suppose replacing dmenu would be trivial for me.

          People get used to doing things if they use Linux for years, and all the work there seemed pretty wayland-specific to me. Of course it was adjusting sway to be like i3, but people who want to do that sort of customization would have done that on another WM on X as well…

          1. 5

            If you don’t use many X11-specific tools, then I don’t really understand how switching to Sway would be complicated. You don’t even need to replace dmenu if you don’t want to. Just copy over the config and you’re good to go?

            Sway is strictly an i3(-gaps) port of i3 to Wayland, so you don’t need to adjust Sway to behave like i3.

            1. 4

              Just because I don’t use them doesn’t mean I see why some problems in the article are solved just like I would solve them. Which means I seem to have at least the same basic understanding.

              And I find the procedure to mimic things quite involved. I didn’t say wayland was bad, just that this seems like a lot of work to replace tools that have always worked.

              1. 3

                While it seems to be the case that Ubuntu doesn’t have these tools packaged (yet), there are quite a few already packaged for Arch Linux, and I know that Fedora also has a pretty thorough selection. I had very little trouble switching to Sway and Wayland (earlier this year I think), which was a pleasant surprise. Most of my customisations were more quality of life than strictly necessary. It’s quite usable before you even start customising it.

      2. 3

        As long as I can run a browser and a terminal on X I won’t switch.

        1. 3

          People will argue that you aren’t guaranteed to be able to either of those things… Without tearing, on xorg. Depends à bit on your gpu.

    2. 9

      This article contains an example of a HOWTO pattern that has puzzled me for a while.

      First, it suggests to “apt install” a long list of dependencies for waybar.

      Then it suggest to “apt install” waybar itself.

      Does this mean that apt dependency resolution is broken for this package? Or is there another reason for explicitly installing dependencies?

      1. 3

        Thanks for pointing this out. The article started as a file documenting what commands I had used to successfully install things. I had blindly followed the instructions in Waybar’s README, hoping that things would just work. (I was expecting to be building it from source.) And for some reason, when I was editing the article, I failed to question whether installing the dependencies first was necessary.

        I have updated the article accordingly.

        1. 2

          Nice. But now I think you might be holding out on those of us that arrived after your edit - you mention in passing:

          After procrastinating as long as I could, I built Sway 1.5 rc2 from source,

          Given sway is in apt, does that mean it’s just apt-get build-dep sway and a git clone followed by?:

          meson build
          ninja -C build
          1. 2

            First I tried using this: https://github.com/luispabon/sway-ubuntu-build

            As I recall, I managed to get it built (it was a bit of a headache) but it didn’t solve my issues: I think that some of the packages in that repo were out of date at the time. On my second attempt, I followed Sway’s build instructions — but I think I used the version of wlroots that I had built on my first attempt.

    3. 9

      I’ve been running sway since February of 2019, when it was still pretty rough around the edges.

      I was migrating away from OSX and decided to clear a week and test the waters with Sway. First thing I realized is how few things on a computer I actually use: a browser, a terminal, and editor. Since then I’ve started filling out the missing parts.

      Most x11-compatable applications work out of the box. Some require some argument to be set. Some things don’t care (e.g. mu/mbsync), some things use a standard messaging system (SchubsiGo), and something primary function is not the window element (nextcloud).

      There isn’t really the lack of tooling anymore.

      1. 2

        this is a late reply. thanks for the list – I learned a couple of things.

        Two things I miss from my work macos are text expansion and remapping capslock to hyper (super + ctrl + alt).

    4. 6

      The thing I love about i3 is that I can have super-efficient window-management combined with all the niceties of a modern desktop environment like automatically mounting USB drives, and support for my laptop’s screen-brightness and volume keys, a system tray with a volume control slider and quick access to networking and bluetooth settings, etc. etc.

      It’s neat that the author figured out how to get their “paste the current date” keybind to work, but that’s not what I was hoping to get out of this article. :/

      1. 4

        Missing nm-applet (for NetworkManager) was a big blocker for me, when I tried sway on a laptop.

      2. 3

        I agree that Sway has a long way to go when it comes to convenience and functional defaults. However, in my experience, support — or lack thereof — for the items you list in the modern desktop niceties category (convenient access to networking, and support for brightness, or laptop specific volume keys) has been pretty similar between Sway and i3. Sway comes in second, but not by much.

        The main difference, in my experience, is how few programs run on Wayland without tinkering.

        But maybe I was missing out on a lot i3 features, and therefore didn’t miss them when I switched to Sway. Or maybe the difference in our experience is partly a result of the distro we’re running.

        1. 4

          If you’re looking for a fancier way to change volume and brightness with function keys I find wob to be rather good.

        2. 2

          i3 itself doesn’t have a lot of those features built-in, but since it’s just an X11 window-manager and it supports most or all of the fancy desktop-environment window hints, it’s not too hard to slot it into a traditional desktop environment that provides all that other stuff.

          Meanwhile, with Wayland, it seems all the pluggable components of the X11 model are collapsed into the compositor, so I can’t set up environment variables in ~/.profile or launch helpers in ~/.xsession. Maybe I can set up systemd to start things for my user session, if Sway integrates with that, but I’m kind of hoping that somebody will figure that stuff out and publish a blog post before I have to do it myself. :)

          1. 4

            Just like with i3, you can start helpers from your Sway config with exec whatever.

            1. 3

              The point is more that i3 can be used to replace the wm part of an already functioning DE.

              1. 3

                Have you done that? Under which DE did you swap out the WM for i3, and what did you do? I tried with both GNOME and KDE, and really wasn’t happy with the results. I wound up going with kwin-tiling on KDE (which is actually pretty good) and calling it done, after spending a week tinkering off and on with substituting i3 in for both of those.

                1. 3

                  I’m a very happy user of i3 + GNOME.

                  1. 2

                    Are you using a recent, vanilla version of GNOME? Maybe I’m fighting the fedora packages as opposed to the DE, if so. I had a hard time getting most things in the settings applets to behave, and power management was really funky, whenever mutter wasn’t running. I even went so far as to try GNOME flashback, but getting that installed without breaking system packages got to be too much effort.

                    1. 3

                      I’m using GNOME Flashback, which is a system package in Debian.

                      1. 2

                        Thanks. That’s probably worth trying again for me. It looks like it is now a system package for Fedora, too, but it wasn’t when I tried.

                        1. 3

                          I wrote up how I set things up on Debian, although there’s a bunch of updates at the bottom that really should be folded back into the main text.

      3. 2

        automatically mounting USB drives, and support for my laptop’s screen-brightness and volume keys,

        How have you got that set up?

        I don’t have automatic mounting of USB drives, and the support for screen and keyboard brightness as well as volume keys comes from bindings I’ve added to my i3 config file that executes brightnessctl for brightness and pactl for volume.

        1. 3

          As I mentioned in another comment, I’m using GNOME Flashback to handle all the non-window-management parts of my desktop experience. I wrote up how I set things up.

          1. 2

            Thanks, I’ll check it out.

    5. 6

      I just wanted to add, since I didn’t mention it in the article:

      I switched to Sway is not because I was expecting that my life would be made easier in the short term, but because of what I expect it to become in the future — based on the developers’ track record for ethics and good sense.

      Thanks @sircmpwn, @emersion and the rest of the Sway team for all the hard work writing the software I use, which makes it possible for me to complain about it being cantankerous and hard to use :)

      1. 2

        Glad you like it! :)

    6. 4

      This article seems to lack motivation. Why would I want to switch to sway? It’s nice that with some work I can keep things working the way they already do for me… but if I just want what I already have why not keep it?

      I have heard rumours that some Wayland-only apps exist, but I’ve never actually run across one. Anyone here have a story about why they’re using wayland?

      1. 4

        Fractional scaling across multiple screens, possibly less tearing - possibly better multi/single screen hotplug (docking/un docking) and/or better sleep/résumé,better TouchPad gesture supportaare pprobably reason one might want to switch to Wayland.

      2. 1

        Idealism :) I figured that I was bound to switch to Sway eventually (see comment above), and might as well get it over with while I was tinkering with my system anyway.

    7. 3

      Nice breakdown of your desktop. I used rofi for a long time but it bugged me that my launcher was running under XWayland, so switched to bemenu. I find this to be better suited to my needs (I don’t need all the features of rofi), more aesthetically pleasing, and best of all, it’s Wayland native :-)

      1. 3

        There is a pull request that adds wayland support to rofi, but its unlike to get merged. That being said you can either compile it yourself or if you have access to the AUR install it from there.

      2. 2
        1. 2

          I use wofi too, but it launches multiple instances if I press the same keycombo multple times. I wish it didn’t

          1. 2

            You can probably fix this by preceding the command to run the launcher with a killall command in your config.

    8. 4

      I do try sway once in a while.

      The last time was the first one I was able to use if for a few days without major issue, but I went back to i3 on the next boot.

      The graphics seem sluggish with it relative to Xorg+i3, and it was thus uncomfortable. Maybe the next time, or maybe once I have a workstation again; Integrated graphics is a bottleneck.

      1. 6

        How long ago was this? Sway has been my daily driver for the last few years, both with Intel integrated and AMD graphics, and I’ve only had similar when not better performance in that regard. The main issue I encounter is compatibility with niche applications.

        1. 2

          Sometime between March and now. Not sure when.

          I will no doubt try Sway again, but one attempt per year or so is enough. Gives the whole stack time to mature and make a difference.

          For contrast, the previous time I had tried it, I gave up and returned to i3 within two hours. A few days is a lot of progress.

          Hardware on latest attempt is Ryzen 3700U (lenovo x395). The attempt before that, Haswell i7 with vega64.

        2. 1

          VMWare workstation has killed each of my attemtps to switch to sway over the past 3 years.

      2. 3

        What’s sluggish about it? It works well for me with the latest Mesa on an IVB CPU/GPU, which is ~8 years old now? There’s nothing sluggish about navigating Sway, and there’s no video tearing!

        1. 2

          It works well for me with the latest Mesa on an IVB CPU/GPU, which is ~8 years old now?

          Good for you. It doesn’t in my Ryzen 3700U laptop, bought mere months ago.

          There’s nothing sluggish about navigating Sway

          Instant switching between workspaces on i3, sluggish on Sway.

          and there’s no video tearing!

          It’d be sad if there was, since wayland’s designed with emphasis on eliminating tearing.

          1. 5

            Instant switching between workspaces on i3, sluggish on Sway.

            Interesting, I’ve had the exact opposite experience. When I ran i3 with a compositor, after switching workspaces, and application which uses OpenGL (including Firefox) would take a few tenths of a second before they showed up (the workspace would switch, but some of the windows in the switched-to workspace would pop in later). On Sway, it is always instant.

            Sucks that it doesn’t work as well for you.

            1. 3

              Same experience, for whatever it’s worth. I switched to Sway on my Pinebook Pro specifically because switching workspaces felt so instantaneous compared to any X11 WM.

              Looks like the 4700U uses the AMD Vega architecture for its GPU, which was released in 2017. I’ve had some definite teething problems with new AMD hardware on Linux, but usually the big issues are fixed pretty quickly. I’d definitely consider this a bug and report it to either Sway or Mesa, would be interesting to see what they say.

            2. 3

              Discrete GPU, perhaps?

              I suspect Wayland generally works better with plenty of vram. Or, conversedly, that it struggles with little vram. To do with composition, and keeping too many graphic buffers.

          2. 3

            Good for you. It doesn’t in my Ryzen 3700U laptop, bought mere months ago.

            If you’re using Mesa, then report it.

            1. 1

              Report what? That Sway is slow? Xorg works fine.

      3. 3

        Just as curiosity, were you using lot of applications which run under Xwayland? For me switching between workspaces is fast, but X applications (on my setup, few electron applications) take while to rerender, thus feeling slow.

        1. 2

          I do indeed run a lot of applications, typically spawning 7 to 10 workspaces.

    9. 2

      Bit late but one thing I really appreciate about Sway over i3 is that the primary documentation is in manpages rather than HTML.

    10. 2

      Waybar is written in C++, not Rust.

      1. 1

        You’re right. For some bizarre reason I was sure it was written in Rust — probably cognitive bleed-through from some other project (waysay, perhaps.) I sit corrected!

    11. 2

      This seems interesting, I’ll definitely give it a try. I’m currently using Regolith linux which seems similar to sway as an i3 alternative. I personally enjoy it over i3 since it’s super convenient to use out of the box. Curious how this compares.

      1. 2

        Regolith is just nicely configured i3 with gnome session (and compton).

        It’s pretty good IMO, the gnome session integration makes it much more usable out of the box to sway. On the other hand… it’s still X with all it’s problems.

    12. -3

      Tiling window managers are not for the faint of heart.

      Oh shut up… I stopped here. I don’t feel anything good will follow.