mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat(adapter): detect niri wayland previews
This commit is contained in:
parent
5d643ee01a
commit
0dc74f5339
2 changed files with 5 additions and 3 deletions
|
|
@ -76,11 +76,12 @@ impl Ueberzug {
|
|||
}
|
||||
}
|
||||
|
||||
// Currently Überzug++'s Wayland output only supports Sway, Hyprland and Wayfire
|
||||
// as it requires information from specific compositor socket directly.
|
||||
// Currently Überzug++'s Wayland output only supports Niri, Sway, Hyprland and
|
||||
// Wayfire as it requires information from specific compositor socket directly.
|
||||
// These environment variables are from ueberzugpp src/canvas/wayland/config.cpp
|
||||
pub(crate) fn supported_compositor() -> bool {
|
||||
env_exists("SWAYSOCK")
|
||||
env_exists("NIRI_SOCKET")
|
||||
|| env_exists("SWAYSOCK")
|
||||
|| env_exists("HYPRLAND_INSTANCE_SIGNATURE")
|
||||
|| env_exists("WAYFIRE_SOCKET")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ impl Actions {
|
|||
writeln!(s, " XDG_SESSION_TYPE : {:?}", env::var_os("XDG_SESSION_TYPE"))?;
|
||||
writeln!(s, " WAYLAND_DISPLAY : {:?}", env::var_os("WAYLAND_DISPLAY"))?;
|
||||
writeln!(s, " DISPLAY : {:?}", env::var_os("DISPLAY"))?;
|
||||
writeln!(s, " NIRI_SOCKET : {:?}", env::var_os("NIRI_SOCKET"))?;
|
||||
writeln!(s, " SWAYSOCK : {:?}", env::var_os("SWAYSOCK"))?;
|
||||
#[rustfmt::skip]
|
||||
writeln!(s, " HYPRLAND_INSTANCE_SIGNATURE: {:?}", env::var_os("HYPRLAND_INSTANCE_SIGNATURE"))?;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue