mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01: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() {
|
||||
"x11" => Self::X11,
|
||||
"wayland" => Self::Wayland,
|
||||
_ => Self::Chafa,
|
||||
"x11" => return Self::X11,
|
||||
"wayland" => return Self::Wayland,
|
||||
_ => {}
|
||||
}
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue