mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
ba41a4f112
commit
e694560d67
3 changed files with 5 additions and 9 deletions
|
|
@ -20,6 +20,9 @@ pub struct Args {
|
|||
#[arg(long)]
|
||||
pub clear_cache: bool,
|
||||
|
||||
/// Use the specified client ID, must be a globally unique number
|
||||
#[arg(long)]
|
||||
pub client_id: Option<u64>,
|
||||
/// Report the specified local events to stdout
|
||||
#[arg(long)]
|
||||
pub local_events: Option<String>,
|
||||
|
|
@ -34,8 +37,4 @@ pub struct Args {
|
|||
/// Print version
|
||||
#[arg(short = 'V', long)]
|
||||
pub version: bool,
|
||||
|
||||
/// Set the YAZI_ID environment variable (integer)
|
||||
#[arg(long)]
|
||||
pub id: Option<u64>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ pub struct Boot {
|
|||
pub flavor_dir: PathBuf,
|
||||
pub plugin_dir: PathBuf,
|
||||
pub state_dir: PathBuf,
|
||||
|
||||
pub yazi_id: Option<u64>,
|
||||
}
|
||||
|
||||
impl Boot {
|
||||
|
|
@ -186,7 +184,6 @@ impl Default for Boot {
|
|||
plugin_dir: config_dir.join("plugins"),
|
||||
config_dir,
|
||||
state_dir: Xdg::state_dir(),
|
||||
yazi_id: ARGS.id.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ pub use sendable::*;
|
|||
use server::*;
|
||||
pub use state::*;
|
||||
use stream::*;
|
||||
use yazi_boot::BOOT;
|
||||
use yazi_boot::ARGS;
|
||||
|
||||
#[cfg(unix)]
|
||||
pub static USERS_CACHE: yazi_shared::RoCell<uzers::UsersCache> = yazi_shared::RoCell::new();
|
||||
|
|
@ -26,7 +26,7 @@ pub fn init() {
|
|||
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
|
||||
|
||||
// Client
|
||||
ID.init(BOOT.yazi_id.unwrap_or(yazi_shared::timestamp_us()));
|
||||
ID.init(ARGS.client_id.unwrap_or(yazi_shared::timestamp_us()));
|
||||
PEERS.with(Default::default);
|
||||
QUEUE_TX.init(tx);
|
||||
QUEUE_RX.init(rx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue