Skip to content

Commit

Permalink
feat: support image preview on WSL (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Oct 24, 2023
1 parent b46e71a commit 8aeef55
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions yazi-adaptor/src/adaptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8aeef55

Please sign in to comment.