v0.1.7
版本发布时间: 2024-06-29 15:10:33
YaLTeR/niri最新发布版本:v0.1.8(2024-08-10 20:40:27)
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.
Fractional Scaling
The big update this time is fractional scale support. You can set output scale to fractional values like 1.5 and automatic scale factor guessing will now return fractional scale factors.
On the surface this sounds simple, but under the hood, doing it properly required a complete refactor of the layout system to use fractional coordinates and sizes (and then chasing down all of the bugs caused by this).
The result is well worth it though. Borders, gaps and windows are always physical-pixel aligned, and not restricted to integer logical pixel positions. There's no blur or position-dependent +-1 px jank. Fractional-scale-aware clients remain crisp at any scale.
Here's a demo of going through every single currently representable fractional scale factor between 100% and 200% where everything remains crisp, including a 1 px checkerboard in mpv. Watch it in the native 1920×1080 resolution if you want to see the checkerboard correctly.
https://github.com/YaLTeR/niri/assets/1794388/458b3021-b1f0-4c30-8f22-6db63af79a41
As a bonus, you can set the scale to a value below 1, which will make things smaller and give you more space. This could be useful in specific cases like monitors with very big pixel size, but it will lose you some image crispness.
Fractional Layout
As previously mentioned, niri layout now completely operates in floating-point. While fractional scaling benefits the most from this, fractional layout is also useful for integer scales.
Concretely, you can now set border and focus ring width, gaps, struts to fractional values, which will round to physical pixels according to the monitor's scale factor. Which means you can have 1 px wide borders on a 200% monitor for example by setting the border width to 0.5.
The view position is also no longer restricted to integer logical pixels, so when you do a touchpad swipe gesture on a 200% monitor, windows will move in single physical pixel increments.
If you're interested in the technical details of how this works, check this wiki page.
Window Screencasts
You can now select an individual window to screencast through xdg-desktop-portal-gnome. You can resize windows, open pop-ups, use block-out rules, and it will all work correctly.
https://github.com/YaLTeR/niri/assets/1794388/c792b448-5b16-4f2d-825f-eebabdad519b
This involved some refactoring of the PipeWire screencasting code in niri, most notably adding support for changing the video stream size on the fly. As a bonus, monitor screencasts will now also keep running through monitor resolution changes.
I still need to work out some details like frame callback delivery to obscured windows, but the current implementation should already work for a lot of use cases.
xdg-activation
@pcc implemented the xdg-activation-v1 protocol which allows apps to pass focus to other apps. For example, clicking on a link in a GTK 4 app will now automatically focus your browser, switching the workspace if necessary.
https://github.com/YaLTeR/niri/assets/1794388/fd444abc-77cd-4089-b43d-97846deb4931
This protocol is also used by clients to indicate urgency; this part is not implemented yet (but planned).
Workspace Switch Mouse Gesture
Last release I added the horizontal Mod + middle mouse drag gesture to scroll the view. This release I also added the vertical drag gesture to switch workspaces, just like on a touchpad you can swipe both horizontally and vertically.
https://github.com/YaLTeR/niri/assets/1794388/3c9485be-189c-4c7c-9094-a3346cf3e36f
Other improvements in this release
- Added four actions
focus-window-{up,down}-or-column-{left,right}
which allow traversing all windows on a workspace in order (thanks @minego). - Added actions
focus-column-right-or-first
,focus-column-left-or-last
which allow the focus to loop around (thanks @sullyj3). - Added actions
focus-column-or-monitor-left
andfocus-column-or-monitor-right
that switch the monitor upon reaching the end of the workspace. - Added
niri msg focused-output
which returns information about the currently focused output (thanks @rustysec). - Added
off
flag to disable input devices (thanks @yuja). - Added
left-handed
flag to touchpad, mouse, tablet input config. - Added
scroll-method
property to touchpad, mouse, trackpoint input config (thanks @yuja). - Added
disabled-on-external-mouse
flag to touchpad input config (thanks @yuja). - Niri now additionally reads the config file path from
$NIRI_CONFIG
, to help with nix wrappers. The--config
flag still takes precedence (thanks @sodiboo). - Changed absolute pointer input to work over a union rectangle across all outputs, rather than picking a single output (thanks @galister).
- Changed tablet input without a specific
map-to-output
to map to a union rectangle across all outputs. This makes Open Tablet Driver work. - Changed foreign-toplevel (i.e. Waybar) window activation to animate the workspace switch.
- Changed output scale setting to no longer require the fractional part, i.e.
scale 2
will work. - Fixed
focus-window-or-workspace-{up,down}
missing the workspace switch animation. - Fixed empty named workspaces disappearing upon output removal.
- Fixed a crash when an (already unfullscreened) window that in a column with other windows requests to be unfullscreened.
- Fixed key repeat not working when the
keyboard
config section is missing. - Fixed some crashes when no outputs are connected. On some devices outputs reconnect themselves upon resuming from sleep, which was triggering these issues.
- Fixed rounded corners rendering blurry on very high scale factors.
- Fixed the automatic draw border with background check to also include the KDE decoration protocol value. This makes it work for some older clients like GTK 3 (thanks @kchibisov).
- Fixed ISO_Level3_Shift modifier not showing up in the Important Hotkeys list.
- Niri now increases the fd limit to the maximum, fixing some fd-heavy clients (e.g. running RustRover in Xwayland).
- Updated Smithay, which fixes running on the NVIDIA 555 driver (explicit sync is still not implemented for now).
1、 niri-0.1.7-vendored-dependencies.tar.xz 53.39MB