mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: support image preview on WSL (#315)
This commit is contained in:
parent
b46e71a6bb
commit
8aeef55b6f
1 changed files with 7 additions and 3 deletions
|
|
@ -57,10 +57,14 @@ impl Adaptor {
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
match env::var("XDG_SESSION_TYPE").unwrap_or_default().as_str() {
|
match env::var("XDG_SESSION_TYPE").unwrap_or_default().as_str() {
|
||||||
"x11" => Self::X11,
|
"x11" => return Self::X11,
|
||||||
"wayland" => Self::Wayland,
|
"wayland" => return Self::Wayland,
|
||||||
_ => Self::Chafa,
|
_ => {}
|
||||||
}
|
}
|
||||||
|
if std::fs::symlink_metadata("/proc/sys/fs/binfmt_misc/WSLInterop").is_ok() {
|
||||||
|
return Self::Kitty;
|
||||||
|
}
|
||||||
|
Self::Chafa
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn term_program() -> (String, String) {
|
pub(super) fn term_program() -> (String, String) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue