repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/scheme/scheme.rs
yazi-shared/src/scheme/scheme.rs
use std::hash::{Hash, Hasher}; use crate::{pool::Symbol, scheme::{AsScheme, SchemeRef}}; #[derive(Clone, Debug, Eq, PartialEq)] pub enum Scheme { Regular { uri: usize, urn: usize }, Search { domain: Symbol<str>, uri: usize, urn: usize }, Archive { domain: Symbol<str>, uri: usize, urn: usize }, Sftp { domain: Symb...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/scheme/traits.rs
yazi-shared/src/scheme/traits.rs
use crate::scheme::{Scheme, SchemeCow, SchemeKind, SchemeRef}; pub trait AsScheme { fn as_scheme(&self) -> SchemeRef<'_>; } impl AsScheme for SchemeRef<'_> { #[inline] fn as_scheme(&self) -> SchemeRef<'_> { *self } } impl AsScheme for Scheme { #[inline] fn as_scheme(&self) -> SchemeRef<'_> { match *self { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/event/event.rs
yazi-shared/src/event/event.rs
use crossterm::event::{KeyEvent, MouseEvent}; use tokio::sync::mpsc; use super::CmdCow; use crate::{RoCell, strand::StrandBuf}; static TX: RoCell<mpsc::UnboundedSender<Event>> = RoCell::new(); static RX: RoCell<mpsc::UnboundedReceiver<Event>> = RoCell::new(); #[derive(Debug)] pub enum Event { Call(CmdCow), Seq(Vec...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/event/mod.rs
yazi-shared/src/event/mod.rs
yazi_macro::mod_flat!(cmd cow event); pub static NEED_RENDER: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/event/cow.rs
yazi-shared/src/event/cow.rs
use std::ops::Deref; use anyhow::Result; use super::Cmd; use crate::data::{Data, DataKey}; #[derive(Debug)] pub enum CmdCow { Owned(Cmd), Borrowed(&'static Cmd), } impl From<Cmd> for CmdCow { fn from(c: Cmd) -> Self { Self::Owned(c) } } impl From<&'static Cmd> for CmdCow { fn from(c: &'static Cmd) -> Self { Se...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/event/cmd.rs
yazi-shared/src/event/cmd.rs
use std::{any::Any, borrow::Cow, fmt::{self, Display}, mem, str::FromStr}; use anyhow::{Result, anyhow, bail}; use hashbrown::HashMap; use serde::{Deserialize, de}; use crate::{Layer, SStr, Source, data::{Data, DataKey}}; #[derive(Debug, Default)] pub struct Cmd { pub name: SStr, pub args: HashMap<DataKey, Dat...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/loc/loc.rs
yazi-shared/src/loc/loc.rs
use std::{hash::{Hash, Hasher}, marker::PhantomData, ops::Deref}; use anyhow::{Result, bail}; use super::LocAbleImpl; use crate::{loc::{LocAble, LocBuf, LocBufAble, StrandAbleImpl}, path::{AsPath, AsPathView, PathDyn}, scheme::SchemeKind, strand::AsStrandView}; #[derive(Clone, Copy, Debug)] pub struct Loc<'p, P = &'...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/loc/able.rs
yazi-shared/src/loc/able.rs
use std::{ffi::{OsStr, OsString}, fmt::Debug, hash::Hash}; use crate::{path::{AsPath, AsPathView}, strand::AsStrandView}; // --- LocAble pub trait LocAble<'p> where Self: Copy + AsStrandView<'p, Self::Strand<'p>>, { type Strand<'a>: StrandAble<'a> + StrandAbleImpl<'a>; type Owned: LocBufAble + LocBufAbleImpl + Int...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/loc/mod.rs
yazi-shared/src/loc/mod.rs
#![allow(private_bounds)] yazi_macro::mod_flat!(able buf loc);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/loc/buf.rs
yazi-shared/src/loc/buf.rs
use std::{cmp, ffi::OsStr, fmt::{self, Debug, Formatter}, hash::{Hash, Hasher}, marker::PhantomData, mem, ops::Deref}; use anyhow::Result; use crate::{loc::{Loc, LocAble, LocAbleImpl, LocBufAble, LocBufAbleImpl}, path::{AsPath, AsPathView, PathDyn, SetNameError}, scheme::SchemeKind, strand::AsStrandView}; #[derive(C...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/translit/table.rs
yazi-shared/src/translit/table.rs
const TABLE_0: [&str; 496] = [ "A", // À 192 "A", // Á 193 "A", // Â 194 "A", // Ã 195 "A", // Ä 196 "A", // Å 197 "AE", // Æ 198 "C", // Ç 199 "E", // È 200 "E", // É 201 "E", // Ê 202 "E", // Ë 203 "I", // Ì 204 "I", // Í 205 "I", // Î 206 "I", // Ï 207 "D", // Ð 208 "N", // Ñ 209 ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/translit/mod.rs
yazi-shared/src/translit/mod.rs
yazi_macro::mod_flat!(table traits);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/translit/traits.rs
yazi-shared/src/translit/traits.rs
use core::str; use std::borrow::Cow; pub trait Transliterator { fn transliterate(&self) -> Cow<'_, str>; } impl Transliterator for &[u8] { fn transliterate(&self) -> Cow<'_, str> { // Fast path to skip over ASCII chars at the beginning of the string let ascii_len = self.iter().take_while(|&&c| c < 0x7f).count()...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/data/key.rs
yazi-shared/src/data/key.rs
use std::borrow::Cow; use ordered_float::OrderedFloat; use serde::{Deserialize, Serialize, de}; use crate::{Id, SStr, path::PathBufDyn, url::{UrlBuf, UrlCow}}; #[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] #[serde(untagged)] pub enum DataKey { Nil, Boolean(bool), #[serde(deserialize_with = "Self::...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/data/mod.rs
yazi-shared/src/data/mod.rs
yazi_macro::mod_flat!(data key);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/data/data.rs
yazi-shared/src/data/data.rs
use std::{any::Any, borrow::Cow}; use anyhow::{Result, bail}; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; use crate::{Id, SStr, data::DataKey, path::PathBufDyn, url::{UrlBuf, UrlCow}}; // --- Data #[derive(Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum Data { Nil, Boolean(bool), Inte...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/path.rs
yazi-shared/src/path/path.rs
use std::{borrow::Cow, ffi::OsStr}; use anyhow::Result; use hashbrown::Equivalent; use super::{RsplitOnceError, StartsWithError}; use crate::{BytesExt, Utf8BytePredictor, path::{AsPath, Components, Display, EndsWithError, JoinError, PathBufDyn, PathDynError, PathKind, StripPrefixError, StripSuffixError}, strand::{AsS...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/view.rs
yazi-shared/src/path/view.rs
// --- AsPathView pub trait AsPathView<'a, T> { fn as_path_view(self) -> T; } impl<'a> AsPathView<'a, &'a std::path::Path> for &'a std::path::Path { fn as_path_view(self) -> &'a std::path::Path { self } } impl<'a> AsPathView<'a, &'a std::path::Path> for &'a std::path::PathBuf { fn as_path_view(self) -> &'a std::pa...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/like.rs
yazi-shared/src/path/like.rs
use std::borrow::Cow; use anyhow::Result; use crate::{Utf8BytePredictor, path::{AsPath, Components, Display, EndsWithError, JoinError, PathBufDyn, PathCow, PathDyn, PathDynError, PathKind, RsplitOnceError, StartsWithError, StripPrefixError, StripSuffixError}, strand::{AsStrand, Strand}}; pub trait PathLike: AsPath {...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/kind.rs
yazi-shared/src/path/kind.rs
use crate::scheme::SchemeKind; pub enum PathKind { Os, Unix, } impl From<SchemeKind> for PathKind { fn from(value: SchemeKind) -> Self { match value { SchemeKind::Regular => Self::Os, SchemeKind::Search => Self::Os, SchemeKind::Archive => Self::Os, SchemeKind::Sftp => Self::Unix, } } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/error.rs
yazi-shared/src/path/error.rs
use thiserror::Error; use crate::strand::StrandError; // --- EndsWithError #[derive(Debug, Error)] #[error("calling ends_with on paths with different encodings")] pub enum EndsWithError { FromStrand(#[from] StrandError), } // --- JoinError #[derive(Debug, Error)] #[error("calling join on paths with different encodi...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/conversion.rs
yazi-shared/src/path/conversion.rs
use super::{PathBufDyn, PathDyn}; use crate::path::PathCow; // --- AsPath pub trait AsPath { fn as_path(&self) -> PathDyn<'_>; } impl AsPath for std::path::Path { fn as_path(&self) -> PathDyn<'_> { PathDyn::Os(self) } } impl AsPath for std::path::PathBuf { fn as_path(&self) -> PathDyn<'_> { PathDyn::Os(self) } } ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/display.rs
yazi-shared/src/path/display.rs
use crate::path::PathDyn; pub struct Display<'a>(pub PathDyn<'a>); impl std::fmt::Display for Display<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self.0 { PathDyn::Os(p) => write!(f, "{}", p.display()), PathDyn::Unix(p) => write!(f, "{}", p.display()), } } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/mod.rs
yazi-shared/src/path/mod.rs
yazi_macro::mod_flat!(buf component components conversion cow display error kind like path view);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/cow.rs
yazi-shared/src/path/cow.rs
use std::borrow::Cow; use anyhow::Result; use crate::path::{AsPath, PathBufDyn, PathDyn, PathDynError, PathKind}; // --- PathCow #[derive(Debug)] pub enum PathCow<'a> { Borrowed(PathDyn<'a>), Owned(PathBufDyn), } impl<'a> From<PathDyn<'a>> for PathCow<'a> { fn from(value: PathDyn<'a>) -> Self { Self::Borrowed(va...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/components.rs
yazi-shared/src/path/components.rs
use std::iter::FusedIterator; use typed_path::Components as _; use crate::{path::{Component, PathDyn}, strand::Strand}; #[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)] pub enum Components<'a> { Os(std::path::Components<'a>), Unix(typed_path::UnixComponents<'a>), } impl<'a> Components<'a> { pub fn path(&s...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/buf.rs
yazi-shared/src/path/buf.rs
use std::{borrow::Cow, ffi::OsString, hash::{Hash, Hasher}}; use hashbrown::Equivalent; use crate::{path::{AsPath, Component, PathDyn, PathDynError, PathKind, SetNameError}, strand::AsStrand, wtf8::FromWtf8Vec}; // --- PathBufDyn #[derive(Clone, Debug, Eq)] pub enum PathBufDyn { Os(std::path::PathBuf), Unix(typed_...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/path/component.rs
yazi-shared/src/path/component.rs
use std::path::PrefixComponent; use crate::{path::PathDynError, strand::Strand}; #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub enum Component<'a> { Prefix(PrefixComponent<'a>), RootDir, CurDir, ParentDir, Normal(Strand<'a>), } impl<'a> Component<'a> { pub fn as_normal(&self) -> Option...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/shell/unix.rs
yazi-shared/src/shell/unix.rs
use std::{borrow::Cow, mem}; use crate::shell::SplitError; pub fn escape_os_bytes(b: &[u8]) -> Cow<'_, [u8]> { if !b.is_empty() && b.iter().copied().all(allowed) { return Cow::Borrowed(b); } let mut escaped = Vec::with_capacity(b.len() + 2); escaped.push(b'\''); for &c in b { match c { b'\'' | b'!' => {...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/shell/error.rs
yazi-shared/src/shell/error.rs
use thiserror::Error; #[derive(Debug, Error)] pub enum SplitError { #[error("missing closing single quote")] MissingSingleQuote, #[error("missing closing double quote")] MissingDoubleQuote, #[error("missing quote after escape slash")] MissingQuoteAfterSlash, }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/shell/windows.rs
yazi-shared/src/shell/windows.rs
use std::borrow::Cow; pub fn escape_os_bytes(b: &[u8]) -> Cow<'_, [u8]> { let quote = needs_quotes(b); let mut buf = Vec::with_capacity(b.len() + quote as usize * 2); if quote { buf.push(b'"'); } // Loop through the string, escaping `\` only if followed by `"`. // And escaping `"` by doubling them. let mut ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-shared/src/shell/mod.rs
yazi-shared/src/shell/mod.rs
//! Escape characters that may have special meaning in a shell, including //! spaces. This is a modified version of the [`shell-escape`], [`shell-words`], //! [Rust std] and [this PR]. //! //! [`shell-escape`]: https://crates.io/crates/shell-escape //! [`shell-words`]: https://crates.io/crates/shell-words //! [Rust std...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/build.rs
yazi-fm/build.rs
use std::{env, error::Error}; fn main() -> Result<(), Box<dyn Error>> { let dir = env::var("OUT_DIR").unwrap(); // cargo build // C:\Users\Ika\Desktop\yazi\target\release\build\yazi-fm-cfc94820f71daa30\out // cargo install // C:\Users\Ika\AppData\Local\Temp\cargo-installTFU8cj\release\build\ // yazi-fm-45df...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/router.rs
yazi-fm/src/router.rs
use anyhow::Result; use yazi_config::{KEYMAP, keymap::{Chord, ChordCow, Key}}; use yazi_macro::emit; use yazi_shared::Layer; use crate::app::App; pub(super) struct Router<'a> { app: &'a mut App, } impl<'a> Router<'a> { pub(super) fn new(app: &'a mut App) -> Self { Self { app } } pub(super) fn route(&mut self, ke...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/panic.rs
yazi-fm/src/panic.rs
use crate::Term; pub(super) struct Panic; impl Panic { pub(super) fn install() { better_panic::install(); let hook = std::panic::take_hook(); std::panic::set_hook(Box::new(move |info| { Term::goodbye(|| { hook(info); 1 }); })); } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/root.rs
yazi-fm/src/root.rs
use mlua::{ObjectLike, Table}; use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use tracing::error; use yazi_binding::elements::render_once; use yazi_core::Core; use yazi_plugin::LUA; use super::{cmp, confirm, help, input, mgr, pick, spot, tasks, which}; pub(super) struct Root<'a> { core: &'a Core, } i...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/dispatcher.rs
yazi-fm/src/dispatcher.rs
use std::sync::atomic::Ordering; use anyhow::Result; use crossterm::event::KeyEvent; use tracing::warn; use yazi_config::keymap::Key; use yazi_macro::{act, emit, succ}; use yazi_shared::{data::Data, event::{CmdCow, Event, NEED_RENDER}}; use yazi_widgets::input::InputMode; use crate::{Executor, Router, app::App}; pub...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/executor.rs
yazi-fm/src/executor.rs
use anyhow::Result; use yazi_actor::Ctx; use yazi_macro::{act, succ}; use yazi_shared::{Layer, data::Data, event::CmdCow}; use yazi_widgets::input::InputMode; use crate::app::App; pub(super) struct Executor<'a> { app: &'a mut App, } impl<'a> Executor<'a> { #[inline] pub(super) fn new(app: &'a mut App) -> Self { S...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/main.rs
yazi-fm/src/main.rs
#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))] #[global_allocator] static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; yazi_macro::mod_pub!(app cmp confirm help input mgr notify pick spot tasks which); yazi_macro::mod_flat!(dispatcher executor logs panic root router signals te...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/logs.rs
yazi-fm/src/logs.rs
use std::fs::File; use anyhow::Context; use crossterm::style::{Color, Print, ResetColor, SetForegroundColor}; use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::EnvFilter; use yazi_fs::Xdg; use yazi_shared::{LOG_LEVEL, RoCell}; static _GUARD: RoCell<WorkerGuard> = RoCell::new(); pub(super) stru...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/term.rs
yazi-fm/src/term.rs
use std::{io, ops::{Deref, DerefMut}, sync::atomic::{AtomicBool, Ordering}}; use anyhow::Result; use crossterm::{event::{DisableBracketedPaste, DisableMouseCapture, EnableBracketedPaste, EnableMouseCapture, KeyboardEnhancementFlags, PopKeyboardEnhancementFlags, PushKeyboardEnhancementFlags}, execute, queue, style::Pri...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/signals.rs
yazi-fm/src/signals.rs
use anyhow::Result; use crossterm::event::{Event as CrosstermEvent, EventStream, KeyEvent, KeyEventKind}; use futures::StreamExt; use tokio::{select, sync::{mpsc, oneshot}}; use yazi_config::YAZI; use yazi_shared::event::Event; pub(super) struct Signals { tx: mpsc::UnboundedSender<(bool, Option<oneshot::Sender<()>>)>...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/tasks/tasks.rs
yazi-fm/src/tasks/tasks.rs
use ratatui::{buffer::Buffer, layout::{self, Alignment, Constraint, Rect}, text::Line, widgets::{Block, BorderType, Widget}}; use yazi_config::THEME; use yazi_core::{Core, tasks::TASKS_PERCENT}; use crate::tasks::List; pub(crate) struct Tasks<'a> { core: &'a Core, } impl<'a> Tasks<'a> { pub(crate) fn new(core: &'a...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/tasks/list.rs
yazi-fm/src/tasks/list.rs
use mlua::{ObjectLike, Table}; use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use tracing::error; use yazi_binding::elements::render_once; use yazi_core::Core; use yazi_plugin::LUA; pub(crate) struct List<'a> { core: &'a Core, } impl<'a> List<'a> { #[inline] pub(crate) fn new(core: &'a Core) -> Self...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/tasks/progress.rs
yazi-fm/src/tasks/progress.rs
use mlua::{ObjectLike, Table}; use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use tracing::error; use yazi_binding::elements::render_once; use yazi_config::LAYOUT; use yazi_core::Core; use yazi_plugin::LUA; pub(crate) struct Progress<'a> { core: &'a Core, } impl<'a> Progress<'a> { pub(crate) fn new(c...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/tasks/mod.rs
yazi-fm/src/tasks/mod.rs
yazi_macro::mod_flat!(list progress tasks);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/app.rs
yazi-fm/src/app/app.rs
use std::{sync::atomic::Ordering, time::{Duration, Instant}}; use anyhow::Result; use tokio::{select, time::sleep}; use yazi_core::Core; use yazi_macro::act; use yazi_shared::event::{Event, NEED_RENDER}; use crate::{Dispatcher, Signals, Term}; pub(crate) struct App { pub(crate) core: Core, pub(crate) term: O...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/mod.rs
yazi-fm/src/app/mod.rs
yazi_macro::mod_pub!(commands); yazi_macro::mod_flat!(app);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/notify.rs
yazi-fm/src/app/commands/notify.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::app::NotifyOpt; use yazi_shared::data::Data; use crate::app::App; impl App { pub(crate) fn notify(&mut self, opt: NotifyOpt) -> Result<Data> { succ!(self.core.notify.push(opt)); } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/update_progress.rs
yazi-fm/src/app/commands/update_progress.rs
use anyhow::Result; use yazi_actor::Ctx; use yazi_macro::{act, render, succ}; use yazi_parser::app::UpdateProgressOpt; use yazi_shared::data::Data; use crate::app::App; impl App { pub(crate) fn update_progress(&mut self, opt: UpdateProgressOpt) -> Result<Data> { // Update the progress of all tasks. let tasks = &...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/mouse.rs
yazi-fm/src/app/commands/mouse.rs
use anyhow::Result; use crossterm::event::MouseEventKind; use mlua::{ObjectLike, Table}; use tracing::error; use yazi_actor::lives::Lives; use yazi_config::YAZI; use yazi_macro::succ; use yazi_parser::app::MouseOpt; use yazi_plugin::LUA; use yazi_shared::data::Data; use crate::app::App; impl App { pub fn mouse(&mut ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/deprecate.rs
yazi-fm/src/app/commands/deprecate.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::app::{DeprecateOpt, NotifyLevel, NotifyOpt}; use yazi_shared::data::Data; use crate::app::App; impl App { pub(crate) fn deprecate(&mut self, opt: DeprecateOpt) -> Result<Data> { succ!(self.core.notify.push(NotifyOpt { title: "Deprecated API".to_owned(...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/reflow.rs
yazi-fm/src/app/commands/reflow.rs
use anyhow::Result; use mlua::Value; use ratatui::layout::Position; use tracing::error; use yazi_actor::lives::Lives; use yazi_config::LAYOUT; use yazi_macro::{render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Root, app::App}; impl App { pub fn reflow(&mut self, _: VoidOpt) -> Result<...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/quit.rs
yazi-fm/src/app/commands/quit.rs
use yazi_boot::ARGS; use yazi_fs::provider::{Provider, local::Local}; use yazi_shared::{event::EventQuit, strand::{StrandBuf, StrandLike, ToStrand}}; use crate::{Term, app::App}; impl App { pub(crate) fn quit(&mut self, opt: EventQuit) -> ! { self.core.tasks.shutdown(); self.core.mgr.shutdown(); futures::exec...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/render.rs
yazi-fm/src/app/commands/render.rs
use std::sync::atomic::{AtomicU8, Ordering}; use anyhow::Result; use crossterm::{cursor::{MoveTo, SetCursorStyle, Show}, execute, queue, terminal::{BeginSynchronizedUpdate, EndSynchronizedUpdate}}; use ratatui::{CompletedFrame, backend::{Backend, CrosstermBackend}, buffer::Buffer, layout::Position}; use yazi_actor::{C...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/mod.rs
yazi-fm/src/app/commands/mod.rs
yazi_macro::mod_flat!( accept_payload bootstrap deprecate mouse notify plugin quit reflow render resize resume stop update_notify update_progress );
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/accept_payload.rs
yazi-fm/src/app/commands/accept_payload.rs
use anyhow::{Result, bail}; use mlua::IntoLua; use tracing::error; use yazi_actor::lives::Lives; use yazi_binding::runtime_mut; use yazi_dds::{LOCAL, Payload, REMOTE}; use yazi_macro::succ; use yazi_plugin::LUA; use yazi_shared::{data::Data, event::CmdCow}; use crate::app::App; impl App { pub(crate) fn accept_payloa...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/update_notify.rs
yazi-fm/src/app/commands/update_notify.rs
use anyhow::Result; use ratatui::layout::Rect; use yazi_adapter::Dimension; use yazi_macro::act; use yazi_parser::notify::TickOpt; use yazi_shared::data::Data; use crate::{app::App, notify}; impl App { pub(crate) fn update_notify(&mut self, opt: TickOpt) -> Result<Data> { let Dimension { rows, columns, .. } = Dime...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/bootstrap.rs
yazi-fm/src/app/commands/bootstrap.rs
use anyhow::Result; use yazi_actor::Ctx; use yazi_boot::BOOT; use yazi_macro::act; use yazi_parser::{VoidOpt, mgr::CdSource}; use yazi_shared::{data::Data, strand::StrandLike, url::UrlLike}; use crate::app::App; impl App { pub fn bootstrap(&mut self, _: VoidOpt) -> Result<Data> { for (i, file) in BOOT.files.iter()...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/resume.rs
yazi-fm/src/app/commands/resume.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Term, app::App}; impl App { pub(crate) fn resume(&mut self, _: VoidOpt) -> Result<Data> { self.core.active_mut().preview.reset(); self.term = Some(Term::start().unwrap()); // While the a...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/resize.rs
yazi-fm/src/app/commands/resize.rs
use anyhow::Result; use yazi_actor::Ctx; use yazi_macro::act; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::app::App; impl App { pub fn resize(&mut self, _: VoidOpt) -> Result<Data> { act!(reflow, self)?; self.core.current_mut().arrow(0); self.core.parent_mut().map(|f| f.arrow(0)); self....
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/stop.rs
yazi-fm/src/app/commands/stop.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::app::StopOpt; use yazi_shared::data::Data; use crate::app::App; impl App { pub fn stop(&mut self, opt: StopOpt) -> Result<Data> { self.core.active_mut().preview.reset_image(); // We need to destroy the `term` first before stopping the `signals` // to ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/app/commands/plugin.rs
yazi-fm/src/app/commands/plugin.rs
use anyhow::Result; use mlua::ObjectLike; use scopeguard::defer; use tracing::{error, warn}; use yazi_actor::lives::Lives; use yazi_binding::runtime_mut; use yazi_dds::Sendable; use yazi_macro::succ; use yazi_parser::app::{PluginMode, PluginOpt}; use yazi_plugin::{LUA, loader::{LOADER, Loader}}; use yazi_proxy::AppProx...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/help/bindings.rs
yazi-fm/src/help/bindings.rs
use ratatui::{buffer::Buffer, layout::{self, Constraint, Rect}, widgets::{List, ListItem, Widget}}; use yazi_config::THEME; use yazi_core::Core; pub(super) struct Bindings<'a> { core: &'a Core, } impl<'a> Bindings<'a> { pub(super) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget for Bindings<'_> { f...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/help/help.rs
yazi-fm/src/help/help.rs
use ratatui::{buffer::Buffer, layout::{self, Constraint, Rect}, text::Line, widgets::Widget}; use yazi_config::{KEYMAP, THEME}; use yazi_core::Core; use super::Bindings; pub(crate) struct Help<'a> { core: &'a Core, } impl<'a> Help<'a> { pub fn new(core: &'a Core) -> Self { Self { core } } fn tips() -> String { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/help/mod.rs
yazi-fm/src/help/mod.rs
yazi_macro::mod_flat!(bindings help);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/mgr/mod.rs
yazi-fm/src/mgr/mod.rs
yazi_macro::mod_flat!(modal preview);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/mgr/modal.rs
yazi-fm/src/mgr/modal.rs
use mlua::{ObjectLike, Table}; use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use tracing::error; use yazi_binding::elements::render_once; use yazi_core::Core; use yazi_plugin::LUA; pub(crate) struct Modal<'a> { core: &'a Core, } impl<'a> Modal<'a> { #[inline] pub(crate) fn new(core: &'a Core) -> Se...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/mgr/preview.rs
yazi-fm/src/mgr/preview.rs
use ratatui::{buffer::Buffer, widgets::Widget}; use yazi_config::LAYOUT; use yazi_core::Core; pub(crate) struct Preview<'a> { core: &'a Core, } impl<'a> Preview<'a> { #[inline] pub(crate) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget for Preview<'_> { fn render(self, win: ratatui::layout::Rect, ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/spot/mod.rs
yazi-fm/src/spot/mod.rs
yazi_macro::mod_flat!(spot);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/spot/spot.rs
yazi-fm/src/spot/spot.rs
use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; use yazi_core::Core; pub(crate) struct Spot<'a> { core: &'a Core, } impl<'a> Spot<'a> { pub(crate) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget for Spot<'_> { fn render(self, win: Rect, buf: &mut Buffer) { let Some(lock) = &self.cor...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/input/mod.rs
yazi-fm/src/input/mod.rs
yazi_macro::mod_flat!(input);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/input/input.rs
yazi-fm/src/input/input.rs
use ratatui::{buffer::Buffer, layout::{Margin, Rect}, text::Line, widgets::{Block, BorderType, Widget}}; use yazi_config::THEME; use yazi_core::Core; pub(crate) struct Input<'a> { core: &'a Core, } impl<'a> Input<'a> { pub(crate) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget for Input<'_> { fn re...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/pick/list.rs
yazi-fm/src/pick/list.rs
use ratatui::{buffer::Buffer, layout::{Margin, Rect}, widgets::{ListItem, Scrollbar, ScrollbarOrientation, ScrollbarState, StatefulWidget, Widget}}; use yazi_config::THEME; use yazi_core::Core; use yazi_widgets::Scrollable; pub(crate) struct List<'a> { core: &'a Core, } impl<'a> List<'a> { pub(crate) fn new(core: &...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/pick/pick.rs
yazi-fm/src/pick/pick.rs
use ratatui::{buffer::Buffer, layout::{Margin, Rect}, widgets::{Block, BorderType, Widget}}; use yazi_config::THEME; use yazi_core::Core; use crate::pick::List; pub(crate) struct Pick<'a> { core: &'a Core, } impl<'a> Pick<'a> { pub(crate) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget for Pick<'_>...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/pick/mod.rs
yazi-fm/src/pick/mod.rs
yazi_macro::mod_flat!(list pick);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/cmp/mod.rs
yazi-fm/src/cmp/mod.rs
yazi_macro::mod_flat!(cmp);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/cmp/cmp.rs
yazi-fm/src/cmp/cmp.rs
use std::path::MAIN_SEPARATOR_STR; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, List, ListItem, Widget}}; use yazi_adapter::Dimension; use yazi_config::{THEME, popup::{Offset, Position}}; use yazi_core::Core; use yazi_shared::strand::StrandLike; pub(crate) struct Cmp<'a> { core: &'a Core,...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/confirm/list.rs
yazi-fm/src/confirm/list.rs
use ratatui::{buffer::Buffer, layout::{Margin, Rect}, widgets::{Block, Borders, Scrollbar, ScrollbarOrientation, ScrollbarState, StatefulWidget, Widget, Wrap}}; use yazi_config::THEME; use yazi_core::Core; pub(crate) struct List<'a> { core: &'a Core, } impl<'a> List<'a> { pub(crate) fn new(core: &'a Core) -> Self {...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/confirm/mod.rs
yazi-fm/src/confirm/mod.rs
yazi_macro::mod_flat!(buttons confirm body list);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/confirm/body.rs
yazi-fm/src/confirm/body.rs
use ratatui::{buffer::Buffer, layout::{Margin, Rect}, style::Styled, widgets::{Block, Borders, Widget}}; use yazi_config::THEME; use yazi_core::Core; pub(crate) struct Body<'a> { core: &'a Core, border: bool, } impl<'a> Body<'a> { pub(crate) fn new(core: &'a Core, border: bool) -> Self { Self { core, border } } ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/confirm/buttons.rs
yazi-fm/src/confirm/buttons.rs
use ratatui::{buffer::Buffer, layout::{Constraint, Rect}, text::Span, widgets::{Paragraph, Widget}}; use yazi_config::THEME; pub(crate) struct Buttons; impl Widget for Buttons { fn render(self, area: Rect, buf: &mut Buffer) { let chunks = ratatui::layout::Layout::horizontal([Constraint::Fill(1), Constraint::Fil...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/confirm/confirm.rs
yazi-fm/src/confirm/confirm.rs
use ratatui::{buffer::Buffer, layout::{Alignment, Constraint, Layout, Margin, Rect}, widgets::{Block, BorderType, Widget}}; use yazi_config::THEME; use yazi_core::Core; pub(crate) struct Confirm<'a> { core: &'a Core, } impl<'a> Confirm<'a> { pub(crate) fn new(core: &'a Core) -> Self { Self { core } } } impl Widget...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/notify/notify.rs
yazi-fm/src/notify/notify.rs
use ratatui::{buffer::Buffer, layout::{self, Constraint, Offset, Rect}, widgets::{Block, BorderType, Paragraph, Widget, Wrap}}; use yazi_core::{Core, notify::Message}; pub(crate) struct Notify<'a> { core: &'a Core, } impl<'a> Notify<'a> { pub(crate) fn new(core: &'a Core) -> Self { Self { core } } pub(crate) fn a...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/notify/mod.rs
yazi-fm/src/notify/mod.rs
yazi_macro::mod_flat!(notify);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/which/which.rs
yazi-fm/src/which/which.rs
use ratatui::{buffer::Buffer, layout, layout::{Constraint, Rect}, widgets::{Block, Widget}}; use yazi_config::THEME; use yazi_core::Core; use super::Cand; const PADDING_X: u16 = 1; const PADDING_Y: u16 = 1; pub(crate) struct Which<'a> { core: &'a Core, } impl<'a> Which<'a> { pub(crate) fn new(core: &'a Core) -> S...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/which/mod.rs
yazi-fm/src/which/mod.rs
yazi_macro::mod_flat!(cand which);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-fm/src/which/cand.rs
yazi-fm/src/which/cand.rs
use ratatui::{buffer::Buffer, layout::Rect, text::{Line, Span}, widgets::Widget}; use yazi_config::{THEME, keymap::Chord}; pub(super) struct Cand<'a> { cand: &'a Chord, times: usize, } impl<'a> Cand<'a> { pub(super) fn new(cand: &'a Chord, times: usize) -> Self { Self { times, cand } } fn keys(&self) -> Vec<Str...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/lib.rs
yazi-adapter/src/lib.rs
yazi_macro::mod_pub!(drivers); yazi_macro::mod_flat!(adapter brand dimension emulator icc image info mux unknown); use yazi_shared::{RoCell, SyncCell, in_wsl}; pub static EMULATOR: RoCell<Emulator> = RoCell::new(); pub static ADAPTOR: SyncCell<Adapter> = SyncCell::new(Adapter::Chafa); // Image state static SHOWN: S...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/unknown.rs
yazi-adapter/src/unknown.rs
use crate::Adapter; #[derive(Clone, Copy, Debug, Default)] pub struct Unknown { pub kgp: bool, pub sixel: bool, } impl Unknown { pub(super) fn adapters(self) -> &'static [Adapter] { use Adapter as A; match (self.kgp, self.sixel) { (true, true) => &[A::Sixel, A::KgpOld], (true, false) => &[A::KgpOld], ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/image.rs
yazi-adapter/src/image.rs
use std::path::{Path, PathBuf}; use anyhow::Result; use image::{DynamicImage, ImageDecoder, ImageError, ImageReader, Limits, codecs::{jpeg::JpegEncoder, png::PngEncoder}, imageops::FilterType, metadata::Orientation}; use ratatui::layout::Rect; use yazi_config::YAZI; use yazi_fs::provider::{Provider, local::Local}; us...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/mux.rs
yazi-adapter/src/mux.rs
use std::borrow::Cow; use anyhow::Result; use tracing::error; use yazi_macro::time; use yazi_term::tty::TTY; use crate::{CLOSE, ESCAPE, Emulator, START, TMUX}; pub struct Mux; impl Mux { pub fn csi(s: &str) -> Cow<'_, str> { if TMUX.get() { Cow::Owned(format!( "{START}{}{CLOSE}", s.trim_start_matches(...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/info.rs
yazi-adapter/src/info.rs
use std::path::PathBuf; use image::{ImageDecoder, ImageError}; pub type ImageFormat = image::ImageFormat; pub type ImageColor = image::ColorType; pub type ImageOrientation = image::metadata::Orientation; #[derive(Clone, Copy)] pub struct ImageInfo { pub format: ImageFormat, pub width: u32, pub height: ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/adapter.rs
yazi-adapter/src/adapter.rs
use std::{env, fmt::Display, path::PathBuf}; use anyhow::Result; use ratatui::layout::Rect; use tracing::warn; use yazi_shared::env_exists; use crate::{Emulator, SHOWN, TMUX, drivers}; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Adapter { Kgp, KgpOld, Iip, Sixel, // Supported by Überzug++ X11, Wayl...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/brand.rs
yazi-adapter/src/brand.rs
use tracing::debug; use yazi_shared::env_exists; use crate::Mux; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Brand { Kitty, Konsole, Iterm2, WezTerm, Foot, Ghostty, Microsoft, Warp, Rio, BlackBox, VSCode, Tabby, Hyper, Mintty, Tmux, VTerm, Apple, Urxvt, Bobcat, } impl Brand { pub(super)...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/emulator.rs
yazi-adapter/src/emulator.rs
use std::{io::BufWriter, time::Duration}; use anyhow::Result; use crossterm::{cursor::{RestorePosition, SavePosition}, execute, style::Print, terminal::{disable_raw_mode, enable_raw_mode}}; use scopeguard::defer; use tokio::time::sleep; use tracing::{debug, error, warn}; use yazi_shared::Either; use yazi_term::tty::{H...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/dimension.rs
yazi-adapter/src/dimension.rs
use std::mem; use crossterm::terminal::WindowSize; use crate::EMULATOR; #[derive(Clone, Copy, Debug)] pub struct Dimension { pub rows: u16, pub columns: u16, pub width: u16, pub height: u16, } impl From<WindowSize> for Dimension { fn from(s: WindowSize) -> Self { Self { rows: s.rows, columns: s.columns...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/icc.rs
yazi-adapter/src/icc.rs
use anyhow::Context; use image::{ColorType, DynamicImage, GrayAlphaImage, GrayImage, ImageDecoder, RgbImage, RgbaImage, metadata::Cicp}; use moxcms::{CicpColorPrimaries, ColorProfile, DataColorSpace, Layout, TransferCharacteristics, TransformOptions}; pub(super) struct Icc; impl Icc { pub(super) fn transform(mut deco...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/iip.rs
yazi-adapter/src/drivers/iip.rs
use std::{fmt::Write, io::Write as ioWrite, path::PathBuf}; use anyhow::Result; use base64::{Engine, engine::{Config, general_purpose::STANDARD}}; use crossterm::{cursor::MoveTo, queue}; use image::{DynamicImage, ExtendedColorType, ImageEncoder, codecs::{jpeg::JpegEncoder, png::PngEncoder}}; use ratatui::layout::Rect;...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/ueberzug.rs
yazi-adapter/src/drivers/ueberzug.rs
use std::{path::PathBuf, process::Stdio}; use anyhow::{Result, bail}; use image::ImageReader; use ratatui::layout::Rect; use tokio::{io::AsyncWriteExt, process::{Child, Command}, sync::mpsc::{self, UnboundedSender}}; use tracing::{debug, warn}; use yazi_config::YAZI; use yazi_shared::{LOG_LEVEL, RoCell, env_exists}; ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false