mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41: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") {
|
if env_exists("WAYLAND_DISPLAY") {
|
||||||
return if supported_compositor { Self::Wayland } else { Self::Chafa };
|
return if supported_compositor { Self::Wayland } else { Self::Chafa };
|
||||||
}
|
}
|
||||||
if env_exists("DISPLAY") {
|
match env::var("DISPLAY").unwrap_or_default().as_str() {
|
||||||
return Self::X11;
|
s if !s.is_empty() && !s.contains("/org.xquartz") => return Self::X11,
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
warn!("[Adapter] Falling back to chafa");
|
warn!("[Adapter] Falling back to chafa");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::{ops::DerefMut, process::ExitStatus, time::Duration};
|
use std::{ops::DerefMut, process::ExitStatus, time::Duration};
|
||||||
|
|
||||||
use futures::future::try_join3;
|
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 tokio::{io::{self, AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader, BufWriter}, process::{ChildStderr, ChildStdin, ChildStdout}, select};
|
||||||
use yazi_binding::Error;
|
use yazi_binding::Error;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue