From 3bee8060c7c62e11111506d39e1e96d746590541 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Tue, 16 May 2023 09:14:33 +0530 Subject: [PATCH] Lower LS_COLORS priority (#622) * Lower LS_COLORS priority Fixes: https://github.com/sayanarijit/xplr/issues/620 * Remove default style * Fix doc markdown --- docs/en/src/awesome-hacks.md | 1 + src/init.lua | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/en/src/awesome-hacks.md b/docs/en/src/awesome-hacks.md index 2cec7c6..fa4be46 100644 --- a/docs/en/src/awesome-hacks.md +++ b/docs/en/src/awesome-hacks.md @@ -492,6 +492,7 @@ local split_preview = { xplr.config.layouts.builtin.default = xplr.util.layout_replace(xplr.config.layouts.builtin.default, "Table", split_preview) ``` + ### Tere Navigation diff --git a/src/init.lua b/src/init.lua index 256009a..bdc03ec 100644 --- a/src/init.lua +++ b/src/init.lua @@ -728,9 +728,7 @@ xplr.config.general.global_key_bindings = { -- The style for the directory nodes -- -- Type: [Style](https://xplr.dev/en/style) -xplr.config.node_types.directory.style = { - fg = "Blue", -} +xplr.config.node_types.directory.style = {} -- Metadata for the directory nodes. -- You can set as many metadata as you want. @@ -766,10 +764,7 @@ xplr.config.node_types.file.meta.icon = "ƒ" -- The style for the symlink nodes. -- -- Type: [Style](https://xplr.dev/en/style) -xplr.config.node_types.symlink.style = { - fg = "Magenta", - add_modifiers = { "Italic" }, -} +xplr.config.node_types.symlink.style = {} -- Metadata for the symlink nodes. -- You can set as many metadata as you want. @@ -2861,7 +2856,7 @@ xplr.fn.builtin.fmt_general_selection_item = function(n) end local ls_style = xplr.util.lscolor(n.absolute_path) local meta_style = xplr.util.node_type(n).style - local style = xplr.util.style_mix({ meta_style, ls_style }) + local style = xplr.util.style_mix({ ls_style, meta_style }) return xplr.util.paint(shortened:gsub("\n", nl), style) end @@ -2884,7 +2879,7 @@ xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m) local nl = xplr.util.paint("\\n", { add_modifiers = { "Italic", "Dim" } }) local r = m.tree .. m.prefix local style = xplr.util.lscolor(m.absolute_path) - style = xplr.util.style_mix({ m.style, style }) + style = xplr.util.style_mix({ style, m.style }) if m.meta.icon == nil then r = r .. ""