MyGit

v0.1.2

YaLTeR/niri

版本发布时间: 2024-02-17 13:33:34

YaLTeR/niri最新发布版本:v0.1.8(2024-08-10 20:40:27)

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.

https://github.com/YaLTeR/niri/assets/1794388/f1ebf2e5-0eb1-4b8f-9eba-6afe60604989

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

相关地址:原始地址 下载(tar) 下载(zip)

1、 niri-0.1.2-vendored-dependencies.tar.xz 52.48MB

查看:2024-02-17发行的版本