Sway 1.0-beta.1 release highlights October 20, 2018 on Drew DeVault's blog

1,173 days ago, I wrote sway’s initial commit, and 8,269 commits followed1, written by hundreds of contributors. What started as a side project became the most fully featured and stable Wayland desktop available, and drove the development of what has become the dominant solution for building Wayland compositors - wlroots, now the basis of 10 Wayland compositors.

Sway 1.0-beta.1 was just released and is 100% compatible with the i3 X11 window manager. It’s faster, prettier, sips your battery, and supports Wayland clients. When we started, I honestly didn’t think we’d get here. When I decided we’d rewrite our internals and build wlroots over a year ago, I didn’t think we’d get here. It’s only thanks to an amazing team of talented contributors that we did. So what can users expect from this release? The difference between sway 0.15 and sway 1.0 is like night and day. The annoying bugs which plauged sway 0.15 are gone, and in their place is a rock solid Wayland compositor with loads of features you’ve been asking after for years. The official release notes are a bit thick, so let me give you a guided tour.

New output features

Outputs, or displays, grew a lot of cool features in sway 1.0. As a reminder, you can get the names of your outputs for use in your config file by using swaymsg -t get_outputs. What can you do with them?

To rotate your display 90 degrees, use:

output DP-1 transform 90

To enable our improved HiDPI support2, use:

output DP-1 scale 2

Or to enable fractional scaling (see man page for warnings about this):

output DP-1 scale 1.5

You can also now run sway on multiple GPUs. It will pick a primary GPU automatically, but you can override this by specifying a list of card names at startup with WLR_DRM_DEVICES=card0:card1:.... The first one will do all of the rendering and any displays connected to subsequent cards will have their buffers copied over.

Other cool features include support for daisy-chained DisplayPort configurations and improved Redshift support. Also, the long annoying single-output limitation of wlc is behind us: you can now drag windows between outputs with the mouse.

See man 5 sway-output for more details on configuring these features.

New input features

Input devices have also matured a lot. You can get a list of their identifiers with swaymsg -t get_inputs. One oft requested feature was a better way of configuring your keyboard layout, which you can now do in your config file:

input "9456:320:Metadot_-_Das_Keyboard_Das_Keyboard" {
    xkb_options caps:escape
    xkb_numlock enabled
}

We also now support drawing tablets, which you can bind to a specific output:

input "1386:827:Wacom_Intuos_S_2_Pen" {
    map_to_output DP-3
}

You can also now do crazy stuff like having multiple mice with multiple cursors, and linking keyboards, mice, drawing tablets, and touchscreens to each other arbitrarily. You can now have your dvorak keyboard for normal use and a second qwerty keyboard for when your coworker comes over for a pair programming session. You can even give your coworker the ability to focus and type into separate windows from what you’re working on.

Third-party panels, lockscreens, and more

Our new layer-shell protcol is starting to take hold in the community, and enables the use of even more third-party software on sway. One of our main commitments to you for sway 1.0 and wlroots is to break the boundaries between Wayland compositors and encourange standard interopable protocols - and we’ve done so. Here are some interesting third-party layer-shell clients in the wild:

We also added two new protocols for capturing your screen: screencopy and dmabuf-export, respectively these are useful for screenshots and real-time screen capture, for example to live stream on Twitch. Some third-party software exists for these, too:

DPMS, auto-locking, and idle management

Our new swayidle tool adds support for all of these features, and even works on other Wayland compositors. To configure it, start by running the daemon in your sway config file:

exec swayidle \
    timeout 300 'swaylock -c 000000' \
    timeout 600 'swaymsg "output * dpms off"' \
       resume 'swaymsg "output * dpms on"' \
    before-sleep 'swaylock -c 000000'

This example will, after 300 seconds of inactivity, lock your screen. Then after 600 seconds, it will turn off all of your outputs (and turn them back on when you wiggle the mouse). This configuration also locks your screen before your system goes to sleep. None of this will happen if you’re watching a video on a supported media player (mpv, for example). For more details check out man swayidle.

Miscellaneous bits

There are a few other cool features I think are worth briefly mentioning:

For the full run-down see the release notes. Give the beta a try, and we’re all looking forward to sway 1.0!


  1. 5,044 sway commits and 3,225 wlroots commits at the time of writing. ↩︎

  2. Sway now has the best HiDPI support on Linux, period. ↩︎

Articles from blogs I read Generated by openring

Robust generic functions on slices

Avoiding memory leaks in the slices package.

via The Go Blog February 22, 2024

ClassNotFoundException: java.util.SequencedCollection

Recently I’ve had users of my libraries start reporting mysterious errors due to a missing reference to SequencedCollection, a Java interface added in JDK 21: Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (Buil…

via Aphyr: Posts February 20, 2024

Status update, February 2024

Hi! February is FOSDEM month, and as usual I’ve come to Brussels to meet with a lot of other FOSS developers and exchange ideas. I like to navigate between the buildings and along the hallways to find nice people to discuss with. This edition I’ve been invol…

via emersion February 20, 2024