feat: image preview with Überzug++ on Niri (#3990)

Co-authored-by: 三咲雅 misaki masa <sxyazi@gmail.com>
This commit is contained in:
Dongda Li 2026-05-22 23:02:40 -04:00 committed by GitHub
parent 5d643ee01a
commit d9cd1907d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View file

@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
### Added ### Added
- Bulk create ([#3793]) - Bulk create ([#3793])
- Image preview with Überzug++ on Niri ([#3990])
### Changed ### Changed
@ -1727,3 +1728,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
[#3934]: https://github.com/sxyazi/yazi/pull/3934 [#3934]: https://github.com/sxyazi/yazi/pull/3934
[#3943]: https://github.com/sxyazi/yazi/pull/3943 [#3943]: https://github.com/sxyazi/yazi/pull/3943
[#3989]: https://github.com/sxyazi/yazi/pull/3989 [#3989]: https://github.com/sxyazi/yazi/pull/3989
[#3990]: https://github.com/sxyazi/yazi/pull/3990

View file

@ -76,11 +76,12 @@ impl Ueberzug {
} }
} }
// Currently Überzug++'s Wayland output only supports Sway, Hyprland and Wayfire // Currently Überzug++'s Wayland output only supports Niri, Sway, Hyprland and
// as it requires information from specific compositor socket directly. // Wayfire as it requires information from specific compositor socket directly.
// These environment variables are from ueberzugpp src/canvas/wayland/config.cpp // These environment variables are from ueberzugpp src/canvas/wayland/config.cpp
pub(crate) fn supported_compositor() -> bool { pub(crate) fn supported_compositor() -> bool {
env_exists("SWAYSOCK") env_exists("NIRI_SOCKET")
|| env_exists("SWAYSOCK")
|| env_exists("HYPRLAND_INSTANCE_SIGNATURE") || env_exists("HYPRLAND_INSTANCE_SIGNATURE")
|| env_exists("WAYFIRE_SOCKET") || env_exists("WAYFIRE_SOCKET")
} }

View file

@ -46,6 +46,7 @@ impl Actions {
writeln!(s, " XDG_SESSION_TYPE : {:?}", env::var_os("XDG_SESSION_TYPE"))?; writeln!(s, " XDG_SESSION_TYPE : {:?}", env::var_os("XDG_SESSION_TYPE"))?;
writeln!(s, " WAYLAND_DISPLAY : {:?}", env::var_os("WAYLAND_DISPLAY"))?; writeln!(s, " WAYLAND_DISPLAY : {:?}", env::var_os("WAYLAND_DISPLAY"))?;
writeln!(s, " DISPLAY : {:?}", env::var_os("DISPLAY"))?; writeln!(s, " DISPLAY : {:?}", env::var_os("DISPLAY"))?;
writeln!(s, " NIRI_SOCKET : {:?}", env::var_os("NIRI_SOCKET"))?;
writeln!(s, " SWAYSOCK : {:?}", env::var_os("SWAYSOCK"))?; writeln!(s, " SWAYSOCK : {:?}", env::var_os("SWAYSOCK"))?;
#[rustfmt::skip] #[rustfmt::skip]
writeln!(s, " HYPRLAND_INSTANCE_SIGNATURE: {:?}", env::var_os("HYPRLAND_INSTANCE_SIGNATURE"))?; writeln!(s, " HYPRLAND_INSTANCE_SIGNATURE: {:?}", env::var_os("HYPRLAND_INSTANCE_SIGNATURE"))?;