From 4812b31e1efa79b89036f35d1f4f08e83a2fa5b2 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Mon, 28 Oct 2024 21:55:38 +0100 Subject: [PATCH] Add nvim-like statusline to yazi Not perfect yet but simmilar at least. --- yazi/.config/yazi/init.lua | 66 ++++++++++++++++++++++++++++++++++ yazi/.config/yazi/package.toml | 5 +++ yazi/.config/yazi/theme.toml | 9 ----- 3 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 yazi/.config/yazi/init.lua create mode 100644 yazi/.config/yazi/package.toml diff --git a/yazi/.config/yazi/init.lua b/yazi/.config/yazi/init.lua new file mode 100644 index 0000000..35f4e8b --- /dev/null +++ b/yazi/.config/yazi/init.lua @@ -0,0 +1,66 @@ +require("yatline"):setup({ + section_separator = { open = "", close = "" }, + part_separator = { open = "", close = "" }, + inverse_separator = { open = "", close = "" }, + + style_a = { fg = "black", bg_mode = { + normal = "#ebbcba", + select = "#c4a7e7", + un_set = "#c4a7e7", + } }, + style_b = { bg = "#2d2b38", fg = "#e0def4" }, + style_c = { bg = "#201e2b", fg = "#706e7d" }, + + selected = { icon = "󰻭", fg = "yellow" }, + copied = { icon = "", fg = "green" }, + cut = { icon = "", fg = "red" }, + + total = { icon = "󰮍", fg = "yellow" }, + succ = { icon = "", fg = "green" }, + fail = { icon = "", fg = "red" }, + found = { icon = "󰮕", fg = "blue" }, + processed = { icon = "󰐍", fg = "green" }, + + show_background = true, + + display_header_line = true, + display_status_line = true, + + header_line = { + left = { + section_a = {}, + section_b = {}, + section_c = {}, + }, + right = { + section_a = {}, + section_b = {}, + section_c = {}, + }, + }, + status_line = { + left = { + section_a = { + { type = "string", custom = false, name = "tab_mode" }, + }, + section_b = { + { type = "string", custom = false, name = "hovered_name" }, + }, + section_c = { + { type = "coloreds", custom = false, name = "count" }, + { type = "coloreds", custom = false, name = "task_states" }, + }, + }, + right = { + section_a = { + { type = "string", custom = false, name = "cursor_position" }, + }, + section_b = { + { type = "string", custom = false, name = "hovered_size" }, + }, + section_c = { + { type = "coloreds", custom = false, name = "permissions" }, + }, + }, + }, +}) diff --git a/yazi/.config/yazi/package.toml b/yazi/.config/yazi/package.toml new file mode 100644 index 0000000..e782fda --- /dev/null +++ b/yazi/.config/yazi/package.toml @@ -0,0 +1,5 @@ +[plugin] +deps = [{ use = "imsi32/yatline", rev = "7b56434" }] + +[flavor] +deps = [] diff --git a/yazi/.config/yazi/theme.toml b/yazi/.config/yazi/theme.toml index ad35592..937fde2 100644 --- a/yazi/.config/yazi/theme.toml +++ b/yazi/.config/yazi/theme.toml @@ -35,15 +35,6 @@ syntect_theme = "~/.config/yazi/rose-pine.tmTheme" # : Status {{{ [status] -separator_open = "" -separator_close = "" -separator_style = { fg = "#2A273F", bg = "#2A273F" } - -# Mode -mode_normal = { fg = "#191724", bg = "#ebbcba", bold = true } -mode_select = { fg = "#e0def4", bg = "#9ccfd8", bold = true } -mode_unset = { fg = "#e0def4", bg = "#b4637a", bold = true } - # Progress progress_label = { fg = "#e0def4", bold = true } progress_normal = { fg = "#191724", bg = "#2A273F" }