mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: ignore XQuartz $DISPLAY variable (#2586)
This commit is contained in:
parent
0082d1181a
commit
2e1156f267
2 changed files with 4 additions and 3 deletions
|
|
@ -109,8 +109,9 @@ impl Adapter {
|
|||
if env_exists("WAYLAND_DISPLAY") {
|
||||
return if supported_compositor { Self::Wayland } else { Self::Chafa };
|
||||
}
|
||||
if env_exists("DISPLAY") {
|
||||
return Self::X11;
|
||||
match env::var("DISPLAY").unwrap_or_default().as_str() {
|
||||
s if !s.is_empty() && !s.contains("/org.xquartz") => return Self::X11,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
warn!("[Adapter] Falling back to chafa");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::{ops::DerefMut, process::ExitStatus, time::Duration};
|
||||
|
||||
use futures::future::try_join3;
|
||||
use mlua::{AnyUserData, ExternalError, IntoLua, IntoLuaMulti, Table, UserData, UserDataFields, UserDataMethods, Value};
|
||||
use mlua::{AnyUserData, ExternalError, IntoLua, IntoLuaMulti, Table, UserData, UserDataMethods, Value};
|
||||
use tokio::{io::{self, AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader, BufWriter}, process::{ChildStderr, ChildStdin, ChildStdout}, select};
|
||||
use yazi_binding::Error;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue