mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
7e81eaf14d
commit
7973331c90
1 changed files with 3 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ impl Adaptor {
|
|||
"foot-extra" => return Self::Sixel,
|
||||
_ => warn!("[Adaptor] Unknown TERM: {term}"),
|
||||
}
|
||||
|
||||
match env::var("XDG_SESSION_TYPE").unwrap_or_default().as_str() {
|
||||
"x11" => return Self::X11,
|
||||
"wayland" => return Self::Wayland,
|
||||
|
|
@ -68,11 +69,12 @@ impl Adaptor {
|
|||
}
|
||||
if env::var_os("DISPLAY").is_some_and(|s| !s.is_empty()) {
|
||||
return Self::X11;
|
||||
}
|
||||
if std::fs::symlink_metadata("/proc/sys/fs/binfmt_misc/WSLInterop").is_ok() {
|
||||
return Self::Kitty;
|
||||
}
|
||||
|
||||
warn!("[Adaptor] WAYLAND_DISPLAY and DISPLAY are both empty");
|
||||
warn!("[Adaptor] Falling back to chafa");
|
||||
Self::Chafa
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue