Sway 1.0
drewdevault.com
drewdevault.com
I want to highlight something that I appreciate in your release post, which is the short explanation between paragraphs 1 & 2:
"Sway is an i3-compatible Wayland desktop for Linux and FreeBSD"
One of my major peeves with OSS projects is the tendency to adopt an "if you're reading this, you already know what this is for" stance. It's not just elitist... it's a missed opportunity to bring passers-by into the fold.
It might seem dull or repetitive to people that are deep in the trees to see layman explanations, but at least linking to them is a small but appreciated nod of respect to people who are just coming online.
To this end, I would challenge that you could set an amazing example that goes further towards accomplishing these goals by linking the words in that description to readable explanations of what the words mean in the context of this project. Your goal should be to move beyond what Sway is and perhaps start with why Sway exists. It's clear that this is important, but someone coming in has no idea what motivated you and your army of contributors to stop other important projects and build this. Where does it fit into the concepts that they are already familiar with? What other technologies does it replace? What can I do with this that I couldn't do before? Are there tradeoffs to using this over other solutions? Are there situations where I shouldn't use this? And eventually: are there newer projects that Sway inspires which are even better that I should probably be using instead?
If we look at your explanation in this new light, "Sway is an i3-compatible Wayland desktop for Linux and FreeBSD", you can see that it's opaque to people who aren't already familiar. i3... you mean like the Intel i3? What's Wayland? I use Ubuntu... isn't that my desktop? I heard MacOS is based on FreeBSD, so can I use this on a Mac?
These aren't problems, they are opportunities to be a hero to the silent majority of people who have no freaking clue what a tiling window manager is or why it might be applicable to them.
"Sway allows you to arrange your application windows logically, rather than spatially. Windows are arranged into a grid by default which maximizes the efficiency of your screen and can be quickly manipulated using only the keyboard."
Sounds interesting. No screenshots, though. Just a big black box reading "No compatible source was found for this media." I guess it's trying to play a video? Why not have a video, and also images which are compatible with every single browser since Netscape?
https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_...
If you want to make it even easier for people, you could try a set of "tumblr-style" extremely short animations/videos, 2 seconds each, without sound, and with a written description of each. For example, you can have one for opening qutebrowser, one for opening a terminal, one for switching between tiling/tabbed, one for resizing tiles, etc. This way, people would get a good overview of features at a glance without having to sit through a two-and-a-half minute video. It is also better for hearing impaired people or people not good at listening to English.
btw I run Sway on my laptop and it's really smooth and a joy to use. Thanks so much for this project!
For what it's worth, I was browsing HN on my iPhone and wrote my comment on my desktop - which means that I did not perceive that you had a video. While this is easily addressed by providing an mp4 encoding alongside your webm, the types of information I'm suggesting you provide would weigh down a product teaser video heavily. The ideal product video is about a minute and focuses entirely on how awesome your life will be when you have access to Sway 1.0. All of the noob questions can safely be answered using text with hyperlinks.
So often I'm linked to a project status announcement where I soon give up because it's not all clear what the project is about. Even just adding a sentence or two like Sway did goes a long way.
Also, migrating from i3 is super easy and painless. Really a seamless upgrade experience. If you've been holding off upgrading to Wayland, now is the time, Sway is absolutely ready.
By the way, you should donate. These people absolutely deserve your money.
* Better multi-window and gesture support
* Gaps built in (currently, i3 is separate from i3-gaps, which is what most actually use). No separate forks to deal with, meaning easier maintenance.
* Wallpaper
* Faster
However, there are some big downsides. Wayland is still pretty beta, and not everything works well with it. This is not the fault of Wayland/sway per se, more the fact that everything is based around X11. Biggest thing for me is no copy/paste. Hidpi scaling is supposed to be a nightmare. Also, sway doesn't support Nvidia, and the author has publicly stated he refuses to support any Nvidia drivers (or at least until they're open-source).
One of the biggest draws is keyboard-friendliness: you don't have to use a mouse to navigate, ever. Nice for those of us who already prefer programs like vim that allow keyboard usage, and can increase productivity. It's also good for multi-window setups (having more than one open), though some people who use tons of windows use bspwm (represents windows with a binary tree).
Furthermore, it's proprietary NVIDIA drivers Wayland isn't supporting, not NVIDIA itself. AFAIK nouveau works just fine. There are many great reasons for not supporting the proprietary NVIDIA drivers.
I think the instructions are meant for Debian however and there are some differences in the commands you need to run. If you use a Redhat distro and/or you want some further optimization tips I'm also happy to work you through the process.
https://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-par...
This is becoming a lot less true. Unless you really want to run the latest games (in which case you'll be on Windows anyway), nvidia is on equal footing as AMD nowadays on Linux. AMD has made a lot of efforts and progress the past few years, and them playing nicely with the OSS community makes a big difference.
My next computer will have an AMD card&processor.
Now I know my next home gaming computer will also have a Radeon card.
P.S. Put a monthly donation for Sway. Really appreciate the work!
Not everything needs to have a real use case!
So it seems like the feature list is 'better gesture support' in exchange for a lot of downsides?
I am not trying to be dismissive, but I see so many people evangelizing it over i3, I feel like I have to be missing something. I can't believe there's a single person who finds those tradeoffs acceptable outside of those who want it to be good eventually and are working towards that.
Even back in 2002 RandR supported obtaining screen size information in pixels and millimeters which can be used to calculate DPI... or actually, what people really want when mentioning "DPI support", an automatic way to scale the windows.
How the window scales is up to the toolkit to implement and is independent of window system and really, even independent of screen size/DPI since some users (e.g. due to sight problems) may want their windows to be scaled even on "low DPI" monitors (the whole DPI thing is just a default setting).
The main problem i see with X here isn't some technical inability, but a way for window managers to notify other clients that they should change their scaling (since the window manager is in a better position to know what scaling each window should use - especially when you want different scaling per monitor, which again can be independent of DPI since you may want a large scale for a wall mounted TV even if the DPI would be very low) - essentially something like a new _NET_WM_SCALE window property for EWMH clients and window managers.
I don't really think they're designed for the same purpose or audience, so I don't think it shames the Apple engineers.
Edit: what I'm saying is they did try to do the fullscreen (and even tiled) modes.
I, along with many millions of people, are using spaces and fullscreen apps daily with no issue. I have used i3 and sway before, and I much prefer the macOS UX. To say that it has failed is sheer arrogance.
On what do you base such a ridiculous claim?
It's especially bad on multi-monitor.
- New windows appear on unfocused monitor at random.
- Can make shortcuts to spaces, but not the fullscreen-apps (which look like spaces to all other effects). There are apps to make shortcuts to apps, but this is useless if you have e.g. two terminals in fullscreen mode, it just targets one window at random.
- Cannot deactivate the slow change-space aninmation.
- Windows are grouped under same app in Alt-Tab list.
- When fullscreen-app, some dialogs do overlay the app, some are hidden on some random space, and some forcefully move your active space. At random.
- Plugging and unplugging monitors frequently wreaks havoc among the window disposition.edit: You can also use something like rofi to fuzzy search for windows and quickly jump to them, instead of alt+tabbing.
Using it to cycle through a pile of apps shown as icons or screenshots is terrible UX, IMHO.
It's not and it completely defeats the purpose of it. Sounds like you shouldn't use a tiling window manager.
This is basically what I do at work on a Windows system, using the drag-to-left and drag-to-right.
For your example case, I'd split the screen with my editor taking up the left half, the split the right half into upper and lower, with SO answer in top half and terminal in bottom half. That's the quick and easy split, I could also fiddle with resizing (using arrow keys) the split a bit left/right or up/down.
This gets the info all visible at the same time, without clicking or tabbing to bring one window at a time to the top.
The usage I described above is what I do on my work machine using i3. I'm gonna try out sway now that it's 1.0!
For many terminal windows or one Emacs and one terminal, I might use tiling, but I can still overlap whenever it makes more sense. Plus, the consistent keyboard controls (I use a config pretty similar to https://www.c0ffee.net/blog/openbsd-on-a-laptop/#cwm) make me more efficient than a mouse interface.
Tiling manager are often keyboard driven. If you use mainly your mouse/touchpad, it can be quite painful.
My feeling in floating window manager is that i soon as a window is hiding another, the one on top should just use all the available space, there's no point in seeing the one bellow. If you need information from 2 windows, it's much better side by side.
Granted, I've been using i3 for more than half a decade, but I do agree with sibling posters on how 'freeing' the experience is once you get used to it. There is no doubt a learning curve; but in my experience it's on the order of days.
I don't care how things are arranged spacially if they are just a few quick letters away.
But yeah, if that's your big use case, seems like you just prefer non-tiling workflows.
Tiling is simply more efficient it drives you into a keyboard based workflow that makes the most efficient use of your screen real estate. You can still have floating windows in Sway, or tabs for that matter as well when you need them.
Is it so hard to accept that there are different ways of using a computer and your perceived increase in efficiency might not pan out for everyone? :)
The thing is, we have studies that prove that mouse + keyboard interaction is faster than keyboard-only https://www.asktog.com/TOI/toi06KeyboardVMouse1.html - until you become super proficient with all the relevant the keyboard shortcuts.
So it's not about "inferior"/"superior", it's about your use case.
Even if there were a significant difference one way or the other, it's rare to spend more than 1% of your time arranging your workspace and switching views & windows, so any optimization of that 1% will have minimal effect on your productivity.
"Originally published in the AppleDirect, August, 1989"
I like to organize my workspaces by a category of activity. I'll have one per project I'm currently working on, then one for communications (Email, Chat, etc) one for web-browsing, etc.
I try to keep the non-project ones consistent, so at any point I can, say, tap Meta-9 and instantly be brought a web browser on Workspace 9.
Easily done even with a tiling WM. E.g. I have a keybinding which allows me switching between tiling and floating of a window.
With a stacking window manager, the cognitive overhead of opening a window is much less. You open a program, get a window with focus somewhere. You can start doing your thing immediately without considering window management. Every new window on the stack doesn't affect the others you were using. Subsequently organizing the layout of your windows to be optimized for your current workload however takes more time. This appears to me to make stacking window managers to be more suited for people whose computer use is more dynamic or less organized - people can open and close stuff on a whim.
More organized vs. less cognitive load can be both a personal preference or a workload dependant thing. In case of tiling WMs it also doesn't help that they tend to have very low discoverability and depend almost exclusively on keyboard shortcuts versus GUI elements, only adding to their newbie-unfriendliness. I think that's also telling about the use cases tiling WMs are popular for.
I see a lot of people that respond to you by appealing to some objective superiority of tiling window managers, but there's advantages and disadvantages to both.
It doesn't change anything by default, but with alt-keypad I move certain windows to the upper left, upper right, bottom right, bottom left and so most open applications have their exact position, but everything else is floating.
I guess I'd use a full blown tiling WM if there was one, though, I don't really see any downsides once you configured it to your preference. So bad for new machines, good for regular use. (for me).
This is not true, at least not in i3. When I don't want to think about how to position a new window I can simply switch to tabbed or stack mode, where all windows inside a determined workspace will be "maximized", and I can switch to them by changing the tab (mostly like browsers and web pages). This isn't really much different to Alt-Tabbing, except that I find more efficient (of course, this last part is IMO).
It is true that on my current setup almost all workspaces have a specific usage, however I have a "trash" workspace specially created to put those things that does not make sense in any other workspace. This workspace generally runs in tabbed mode thanks to above.
I've been using a tiling window manager (XMonad) for ~3 years now; this is definitely true for the first few days (or weeks/months) until you adjust. After that, there is less overhead as you become more familiar with how the window manager behaves.
But this is also true for stacking window managers.
> With a stacking window manager, the cognitive overhead of opening a window is much less.
I think the level of cognitive overhead involved comes down (in the case of tiling window mangers) to what window rules you have, what kind of bindings you have set up to navigate between windows, etc., and how comfortable you are with those rules and bindings; the less comfortable you are, the greater your cognitive load will be when trying to use them.
Again, this is also true for stacking window managers.
> Every new window on the stack doesn't affect the others you were using.
Unless it "steals" focus and blocks the window you were working on. But that's expected behavior in a stacking window manager, so it's not much of a disruption. And it's one a user will certainly be aware of when opening a new window.
And this can (and usually is) be true for tiling window managers as well.
> I see a lot of people that respond to you by appealing to some objective superiority of tiling window managers, but there's advantages and disadvantages to both.
Right. There are pros and cons to each and really, but most people just don't really care that much about what window manager they're using.
I do want to add that one of the biggest pros to a tiling window manager (and a few stacking WMs) is the amount of customization available; if you're using a WM like XMonad, i3, Sway, bspwm, herbstluftwm, etc., you can configure the WM to do basically anything (including behave like a stacking WM), while many stacking WMs are fairly limited in how much customization they can have.
But that makes the assumption you're interested in customizing, which not everyone is.
They have different design goals. A tiling window manager is not a good default for everyone or every device type or screen size.
Also, mobile OSes won't really ever have more than 2-3 windows shown at the same time, since the screens are so small. That will probably change once we have folding devices or AR/VR. But super limited "tiling" window managers do make sense with such limited UIs.
Do you have proof of this? I suspect they failed because everyone decided to copy the Mac which was trying to emulate a real desktop with bits of paper on it.
> Super limited "tiling" window managers do make sense with such limited UIs.
They also often make sense for complicated UIs, e.g. IDEs such as Visual Studio and browsers such as Firefox, which have docked sidebars and tabs in preference to overlapping windows.
> The first version (Windows 1.0) featured a tiling window manager, partly because of litigation by Apple claiming ownership of the overlapping window desktop metaphor. But due to complaints, the next version (Windows 2.0) followed the desktop metaphor. All later versions of the operating system stuck to this approach as the default behaviour.
I disagree on the point of screen size. On small screens I want every last pixel to count, and tiling and tabs work well for that. On large screens, I find tiling to be a more efficient option than dragging windows around.
That said, available input devices absolutely do make a difference, and that does correlate with screen size.
I'm not well versed in the details of the conflict, and of course any open source project is not compelled to support anything they don't want to. That being said it would have been nice to know that they have no plans to support a large percentage (majority?) of the consumer, dedicated GPU market.
If/when I am able to get a new AMD card I will certainly try it then.
However, we only need to support Nvidia if our goals include "adoption by Nvidia users". But they don't, so we aren't going to.
nvidia is simply being uncooperative.
99% of my time is spent between my browser, my IDE and my terminal. A half-size browser is painful to work with, I need it full screen. Same for IDE. Same for terminal, I do need multiple terminals but I want them together.
I also have another workspace for chat stuff (browser with whatsapp, slack, messenger) and another for random apps (spotify mostly)
So I end up having cmd-tab set up to switch between browser and IDE (don't even get me started on the default macOS behaviour) and have a drop-down terminal mapped to shift-space, so I'm always one keystroke away from the app I want to use. For the rare case I use another app (some excel file containing data), I can afford the manual window switch.
And for the tiling terminal, tmux is my friend. Also allows me to see the same set of terminals between workspaces (multiple terminal windows on the same tmux session)
from what I understand the team on qutebrowser is actively working on an API for addons, but in the meantime it's a nonstarter for me.
thank you for your contributions, by the way.
Workflow:
- site needs a login
- mod+- to get keepassxc to the front
- ctrl+f for search, typing the first letters of the service
- ctrl+c to copy the password
Something like:
config.bind('key', 'spawn --userscript qute-pass')
https://github.com/qutebrowser/qutebrowser/tree/master/misc/...
None of this requires the mouse and so it all quickly becomes muscle memory. I don't really have to search for anything because it's automatically managed into neat piles within their own workspaces.
I also effectively get 10 times the desktop real-estate compared with a non-tiling window manager, because I'm more likely to use all 10 workspaces when switching between them is a matter of pressing command+{workspace number}.
This makes them pretty much useless if you switch hundreds of times a day.
Sway is at its best when you take back control over window management from your applications and give it to your window manager. Firefox tabs are great, but they only manage Firefox windows. Tmux is great, but it only lets you tile terminals. Vim is great but it only lets you tile editors. This paradigm forces you to arrange your windows according to their type, rather than whatever layout makes sense for your workflow.
Here's a layout I often use:
I dedicate a workspace to writing a piece of software. I split it vertically and keep my editors for the files I'm actively working on on the right split and reference material on the left.
That means that my right split is mostly editor windows, but my left split is very heterogeneous. Sometimes I want to use a documentation web page for reference. Sometimes I want to reference a manpage in a terminal window. Or a repl. Or an editor window displaying a file in (conceptually) read-only mode. I keep all these sorts of windows in the same row of tabs — impossible in the conventional window management paradigm.
You need to choose software that lends itself well to this paradigm. Some software is more amenable, and some less.
Here are my recommendations:
Firefox with my webextension: https://github.com/adrusi/notable
Alacritty or st for the terminal
Kakoune for the editor (Vim probably can't be made to work, since it doesn't use a proper client/server model. Emacs doesn't work out of the box, but I'm sure it could be made to work. Atom and vscode conflate the concept of a window with the concept of a project too thoroughly for me to hold out any hope that they can be adapted easily. Kakoune works out of the box.)
Pidgin for instant messaging (works well for IRC and Facebook messages; has a config option to open new chats as new windows instead of tabs)
Zathura for viewing PDFs
Mpv for video and audio
And I'd like to second it: Sway has been great and I'm stoked for this release!
Hm, looks like the branch/subproject in chrome is "ozone" and some work is ongoing there:
For me the only XWayland apps that I want to use on the HiDPI display are Chromium and VSCode and both of them have options for scaling (e.g.: "--force-device-scale-factor=2" for Chromium; "window.zoomLevel" for VSCode).
- Firefox: about:config set layout.css.devPixelsPerPx to 1.5
- Emacs: Font size 16
- Terminal: Font size 16
- Signal: start with --force-device-scale-factor=1.5
Not perfect, but good enough for now.
Whereas before installing nvidia proprietary drivers was just a nuisance, now I am looking for alternative GPUs as I use Linux on all my machines.
I'd love for this situation to change, but until then, i'm on i3-gaps and happy.
The result is that anyone doing low-level graphics on Linux would have to support two entirely separate, very complex APIs - one for everyone but nvidia, and then one for the proprietary nvidia drivers. Unsurprisingly, not many people are up for that.
Realistically, nvidia just don’t care about Linux outside of very specific use cases where they’re working with the system integrators directly, the same as Broadcom and a few others. If you’re building a Linux system without their support, you’d be well advised to stick with GPU developers that actually work with Linux developers.
Nvidia refuses to support GBM, a standard way of allocating memory for graphics. Either they refuse this out of spite, or (more likely) because it fundamentally doesn't fit the architecture of their closed source driver. They are so desperate to push their alternative, EGLStreams, that they have lobbied Gnome and even created patches for KDE to be able to run Wayland on these DEs. This is not some closed source vs open source thing, since AFAICT the closed source Mali driver seems to support GBM and Wayland implementations that need it.
Therefore, the problem isn't that Sway doesn't support Nvidia. The problem is that that Nvidia doesn't support the standard ways to do graphics on Linux. This something Nvidia can in principle remediate themselves if they want it enough.
That's how it is, and I'd like to ask everyone to refrain from drawing this particular flamewar out any further.
That was the only gripe I had with sway. It solved all my tiny issues with i3 and made config much nicer too. Certainly making the switch if IME is better (or if I can easily help out).
Real big thanks to the wlroots/sway community.
Disclaimer: I haven't read up anything on wayland and don't know too much about how X or it's mechanics work
What is this about? The look of i3-gaps is extremely undesirable to me. Is it easy to avoid the look of i3-gaps?
I have a laptop hooked up to 2 additional monitors. When going to meetings I'm often disconnecting the screens then reconnecting them when I'm back at my desk.
Now for a completely orthogonal but still slightly related question: which Linux-browser does currently have the best Wayland-support?
Any clear favorite or are they all pretty much the same?
Note that perf for Firefox+HiDPI+Wayland-native is noticeably worse than XWayland (regardless of whether it's scaled or Firefox is rendering itself at 2x), and keyboard shortcuts are still not functioning correctly (and apparently only in Sway).
https://old.reddit.com/r/unixporn/search?q=sway&restrict_sr=...
Is there a good distro to run this on? I run Ubuntu at home but from my understanding, adding Sway to Ubuntu seems non-trivial. Is there a good distro I can switch to that supports Sway?
If it comes highly recommended, though, I'll give it a shot. OpenRC really is a thing of beauty and that's the one thing I miss from Gentoo.
Anyhow.. Congratulations to this truly impressive achievement.
Has anyone gotten proper scaling working?
However, Xwayland apps will be blurry. This is a harder problem to solve, but KDE is working on a solution which would work for sway too.
Scaling just works... except with XWayland apps. And I think we should investigate sommelier more for that, though it's increasingly irrelevant to me, as a user. Note that Chromium seems to be a big burden right now, as Ozone/Wayland is not ready yet and is not included in default configurations. (But I'm going to start publishing Chromium+vaapi+wayland builds to nixpkgs-wayland, which I maintain).
Let me know if I can answer questions or help. Sway is the first place I've finally get decent about Linux+HiDPI.
edit: To emphasize my point, I can actually step up/down the scaling factor in .1 increments (imagine Ctrl +/- keybindings). It's not quite as smooth as ChromeOS's entire UI scale, but I honestly never thought I'd see this in Linux.
And quite a bit of activity in the last 30 days: https://github.com/awesomeWM/awesome/pulse/monthly
https://www.youtube.com/watch?v=VuRXHJu5Kmg
tl;dw: you can't set your position but a drop-down terminal is still in the cards
Thanks for responding.
Having watched the video, it seems like we could do a "pop-in" terminal (which is how guake and tilix already do their "drop-down" mode because they let the WM actually do the drawing), but a true "drop-down" terminal a la Yakuake or the old id Quake consoles would require some additional functionality, since you'd essentially have to re-draw the application window at Y Pos +10 each time to give the effect of a moving window until it reached its final point.
Is that possible?
So yes, it's possible. I'm not aware of any existing drop-down terminal using the protocol yet.
I won't be switching to sway anytime soon as I really need support for screen-capture and video-sharing (i.e Zoom and Google Hangouts) to share my code screen for walkthroughs with my remote colleagues.
I effectively downgraded from Ubuntu 18.04 to the more stable 16.04 due to the lack of above support.
I see the following in the release notes:
>A real time screen capture protocol has been developed and implemented (which allows for future third-party screenshot and video capture tools)
Waiting with baited breath till support for it is fully fleshed out.
Cheers.
In all seriousness, I have not found an i3 clone for windows that I am happy with. I am making due with a combination of VirtuaWin for workspace switching, windows key app positioning and multiple monitors.
"Tip: buy your hardware with open source support in mind."
Is it really necessary to put statements with such a condescending tone? Am I the only one who thinks that it can only hurt a project in the long term?
That said I then took on some enterprise roles and the lax work ethic blew my mind. It was like a vacation. Eternal summer. I recommend it.