Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions yazi-config/preset/theme-dark.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ unset_alt = { fg = "red", bg = "gray" }
# : Status bar {{{

[status]
overall = {}
separator_open = ""
separator_close = ""

Expand Down
1 change: 1 addition & 0 deletions yazi-config/preset/theme-light.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ unset_alt = { fg = "red", bg = "gray" }
# : Status bar {{{

[status]
overall = {}
separator_open = ""
separator_close = ""

Expand Down
1 change: 1 addition & 0 deletions yazi-config/src/theme/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ struct Mode {

#[derive(Deserialize, Serialize)]
struct Status {
pub overall: Style,
pub separator_open: String,
pub separator_close: String,

Expand Down
5 changes: 3 additions & 2 deletions yazi-plugin/preset/components/status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Status:mode()

local style = self:style()
return ui.Line {
ui.Span(THEME.status.separator_open):fg(style.main.bg),
ui.Span(THEME.status.separator_open):fg(style.main.bg):bg("reset"),
ui.Span(" " .. mode .. " "):style(style.main),
ui.Span(THEME.status.separator_close):fg(style.main.bg):bg(style.alt.bg),
}
Expand Down Expand Up @@ -128,7 +128,7 @@ function Status:position()
return ui.Line {
ui.Span(THEME.status.separator_open):fg(style.main.bg):bg(style.alt.bg),
ui.Span(string.format(" %2d/%-2d ", math.min(cursor + 1, length), length)):style(style.main),
ui.Span(THEME.status.separator_close):fg(style.main.bg),
ui.Span(THEME.status.separator_close):fg(style.main.bg):bg("reset"),
}
end

Expand All @@ -141,6 +141,7 @@ function Status:redraw()
local right_width = right:width()

return {
ui.Text(""):area(self._area):style(THEME.status.overall),
ui.Text(left):area(self._area),
ui.Text(right):area(self._area):align(ui.Text.RIGHT),
table.unpack(ya.redraw_with(Progress:new(self._area, right_width))),
Expand Down
5 changes: 5 additions & 0 deletions yazi-plugin/src/elements/rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ impl UserData for Rect {
fields.add_field_method_get("w", |_, me| Ok(me.width));
fields.add_field_method_get("h", |_, me| Ok(me.height));

fields.add_field_method_set("x", |_, me, x| Ok(me.0.x = x));
fields.add_field_method_set("y", |_, me, y| Ok(me.0.y = y));
fields.add_field_method_set("w", |_, me, w| Ok(me.0.width = w));
fields.add_field_method_set("h", |_, me, h| Ok(me.0.height = h));

fields.add_field_method_get("left", |_, me| Ok(me.left()));
fields.add_field_method_get("right", |_, me| Ok(me.right()));
fields.add_field_method_get("top", |_, me| Ok(me.top()));
Expand Down
2 changes: 1 addition & 1 deletion yazi-plugin/src/loader/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Loader {
yazi_proxy::AppProxy::notify(yazi_proxy::options::NotifyOpt {
title: "Deprecated entry file".to_owned(),
content: format!(
"The plugin entry file `init.lua` has been deprecated in v0.4.3 in favor of the new `main.lua`, and it will be fully removed in the next major version 0.5.
"The plugin's entry file `init.lua` has been deprecated in favor of the new `main.lua` (user's own `init.lua` remains unchanged).

Please run `ya pack -m` to automatically migrate all plugins, or manually rename your `{name}.yazi/init.lua` to `{name}.yazi/main.lua`."
),
Expand Down
Loading