diff --git a/yazi-config/preset/theme-dark.toml b/yazi-config/preset/theme-dark.toml index 1457cc2a..95340959 100644 --- a/yazi-config/preset/theme-dark.toml +++ b/yazi-config/preset/theme-dark.toml @@ -128,6 +128,14 @@ btn_labels = [ " [Y]es ", " (N)o " ] # : }}} +# : Spot {{{ + +[spot] +border = { fg = "blue" } +title = { fg = "blue" } + +# : }}} + # : Completion {{{ [completion] diff --git a/yazi-config/preset/theme-light.toml b/yazi-config/preset/theme-light.toml index abe33d57..158802fd 100644 --- a/yazi-config/preset/theme-light.toml +++ b/yazi-config/preset/theme-light.toml @@ -128,6 +128,15 @@ btn_labels = [ " [Y]es ", " (N)o " ] # : }}} +# : Spot {{{ + +[spot] +border = { fg = "blue" } +title = { fg = "blue" } + +# : }}} + + # : Completion {{{ [completion] diff --git a/yazi-config/src/theme/theme.rs b/yazi-config/src/theme/theme.rs index c23e2ec8..962f10dd 100644 --- a/yazi-config/src/theme/theme.rs +++ b/yazi-config/src/theme/theme.rs @@ -15,6 +15,7 @@ pub struct Theme { status: Status, pub input: Input, pub confirm: Confirm, + pub spot: Spot, pub pick: Pick, pub completion: Completion, pub tasks: Tasks, @@ -127,6 +128,12 @@ pub struct Confirm { pub btn_labels: [String; 2], } +#[derive(Deserialize, Serialize)] +pub struct Spot { + pub border: Style, + pub title: Style, +} + #[derive(Deserialize, Serialize)] pub struct Pick { pub border: Style, diff --git a/yazi-plugin/src/utils/spot.rs b/yazi-plugin/src/utils/spot.rs index a08a55bd..b0029dde 100644 --- a/yazi-plugin/src/utils/spot.rs +++ b/yazi-plugin/src/utils/spot.rs @@ -1,5 +1,5 @@ use mlua::{AnyUserData, Function, Lua, Table}; -use ratatui::style::Stylize; +use yazi_config::THEME; use yazi_macro::emit; use yazi_shared::{Layer, event::Cmd}; @@ -70,10 +70,10 @@ impl Utils { area, position: ratatui::widgets::Borders::ALL, type_: ratatui::widgets::BorderType::Rounded, - style: ratatui::style::Style::default().blue(), + style: ratatui::style::Style::from(THEME.spot.border), titles: vec![( ratatui::widgets::block::Position::Top, - ratatui::text::Line::raw(lock.url.name().to_string_lossy().into_owned()).centered(), + ratatui::text::Line::raw(lock.url.name().to_string_lossy().into_owned()).centered().style(THEME.spot.title), )], }), Renderable::Table(table),