github YaLTeR/niri v0.1.2

latest releases: v0.1.9, v0.1.8, v0.1.7...
7 months ago

Thanks everyone for 1000 stars! 🥳

Niri is a scrollable-tiling Wayland compositor. Windows are arranged in columns on an infinite strip going to the right. Opening a new window never causes existing windows to resize.

Here are the improvements from the last release.

Note

Packagers: niri now requires libinput >= 1.21.

The new niri-visual-tests subcrate is development-only and should not be packaged. If you do cargo test --workspace, make sure to exclude it: cargo test --workspace --exclude niri-visual-tests, as it brings extra native dependencies.

Window opening animations

Windows now appear with an animation! Existing windows to the right move away, and the new window fades in, avoiding sudden visual jumps. All happening quickly enough to hopefully not be distracting.

niri-open-anims-release.mp4

More animations are coming, but they need time and work to implement right.

Animation settings

If you prefer reduced motion, or on the contrary if you want more animation, you can now set this up in a new animations config section. There's a flag to turn off, and a setting to adjust speed for all animations at once, as well as settings for every individual animation should you need it.

These settings replace the now-removed animation-slowdown debug flag.

Idle protocols

Niri now implements the ext-idle-notify and idle-inhibit pair of Wayland protocols. This allows tools like swayidle to work, and clients like mpv to pause them from working while you're watching videos.

As a bonus, I also implemented the org.freedesktop.ScreenSaver D-Bus interface for idle inhibiting, used by xdg-desktop-portal-gtk. This was necessary to make Flatpak Firefox correctly inhibit the idle state, and in general covers more applications.

Invoke actions via IPC

As the first expansion to the niri msg command, you can now invoke any bindable action with niri msg action do-something. That is, if you can bind something like Mod+F { maximize-column; }, then you can also call it programmatically with niri msg action maximize-column.

Turns out, one thing IPC actions are pretty convenient for is scripting video demos, like the one above!

Also, niri now has a way to report errors back to the IPC client, instead of leaving it in the dark for requests that don't otherwise need a response.

Window rules (the beginnings thereof)

You can now set some (at the moment, two) settings on a per-window basis. You can match or exclude windows from a rule with regular expressions on app-id and window title, similarly to other compositors. See the default config for a detailed explanation.

The settings you can currently set are default-column-width and open-on-output. Most notably, this lets you work around WezTerm's initial configure bug:

window-rule {
    // This regexp is intentionally made as specific as possible.
    // You can get away with app-id="wezterm" if you want.
    match app-id=r#"^org\.wezfurlong\.wezterm$"#

    default-column-width {}
}

More rules, including dynamically updating ones, are coming, after some refactors.

Better focus stealing prevention

To minimize your distraction, niri prevents new windows from taking focus while you're in a fullscreen application (I've had enough games ruined by a sudden Steam chat message). In this release, niri will additionally track when a newly opened window is a dialog from a particular existing window, and put that dialog to the immediate right from its parent window. The dialog will get focus only if the parent window was focused.

This change both prevents some random client from a different monitor/workspace from taking focus with a sudden dialog (looking at you, syncthing-gtk), and lets dialogs originating from fullscreen windows take focus as expected, bypassing the normal fullscreen focus stealing prevention.

Improved filtering in the hotkey overlay

The hotkey overlay shows a hardcoded set of binds that I deemed "most important". Included are the spawn actions, because binds like "spawn terminal" and "spawn application launcher" are definitely up there in the importance list.

However, not all commands you might want to spawn are that important, and with a lot of binds, the list could get polluted with many entries like XF86AudioRaiseVolume. Filtering based on program name doesn't sound very robust, so, instead, now the hotkey overlay will only show spawn binds with Mod or Super in the hotkey.

Additionally, out of multiple spawn binds to the same command, only the first one will show up in the hotkey overlay, which is consistent with all other hotkeys.

Before After
Hotkey overlay before the change. Hotkey overlay after the change.

Other improvements

  • Fixed a crash with some monitors with weird EDID data, and fixed inability to light up some monitors by filtering out interlaced modes.
  • Implemented DRM leasing. This lets you use VR applications and headsets with niri. Thanks @Supreeeme for working on this!
  • Added consume-or-expel-window-{left,right} actions that either expel the focused window into its own column, or consume a singular focused window into a column. These act as an alternative to the existing consume and expel commands, and are not bound to any keys by default. Thanks @exoticorn for implementing them!
  • Added a dwtp flag to touchpad settings for disable-when-trackpointing.
  • Added trackpoint input settings. Thanks @okvik for implementing them!
  • Added a way to bind / IPC-invoke quit while skipping the "Are you sure you want to exit niri?" dialog: Mod+Shift+E { quit skip-confirmation=true; }.
  • You can no longer spawn multiple lockscreen clients at once (more relevant now with swayidle).
  • Fixed binds like Super+Q not working (you had to spell it out as Mod+Super+Q).
  • Changed the default swaylock bind from Mod+Alt+L to Super+Alt+L to fix a collision with the Mod+L bind when running niri as a window (not sure how I missed this in testing). You don't usually want to "lock the screen" of a nested niri anyway.
  • Monitors powered off with DPMS will now light up upon switching the TTY back to niri.
  • The NIRI_SOCKET environment variable is now exported into the systemd and D-Bus session, which lets systemd units run niri msg. For example, this allows you to run swayidle as a systemd service.
  • Fixed a Smithay bug which mistakenly sent primary-selection to wlr-data-control v1 clients, causing them to crash (thanks @kchibisov).
  • Fixed border using focus ring's default values instead of its own.
  • Fixed omitting the layout config section resulting in gaps 0 instead of the default gaps 16.
  • Fixed target monitor not getting focus when pressing move-column-to-monitor-* on an empty source monitor.

Don't miss a new niri release

NewReleases is sending notifications on new releases.