summaryrefslogtreecommitdiff
path: root/fedora/.config/yazi/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'fedora/.config/yazi/init.lua')
-rw-r--r--fedora/.config/yazi/init.lua72
1 files changed, 72 insertions, 0 deletions
diff --git a/fedora/.config/yazi/init.lua b/fedora/.config/yazi/init.lua
new file mode 100644
index 0000000..6c7ee4f
--- /dev/null
+++ b/fedora/.config/yazi/init.lua
@@ -0,0 +1,72 @@
+Status:children_add(function(self)
+ local h = self._current.hovered
+ if h and h.link_to then
+ return " -> " .. tostring(h.link_to)
+ else
+ return ""
+ end
+end, 3300, Status.LEFT)
+
+Status:children_add(function()
+ local h = cx.active.current.hovered
+ if not h or ya.target_family() ~= "unix" then
+ return ""
+ end
+
+ return ui.Line({
+ ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
+ ":",
+ ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
+ " ",
+ })
+end, 500, Status.RIGHT)
+
+Header:children_add(function()
+ if ya.target_family() ~= "unix" then
+ return ""
+ end
+ return ui.Span(ya.user_name() .. "@" .. ya.host_name() .. ":"):fg("blue")
+end, 500, Header.LEFT)
+
+if os.getenv("NVIM") then
+ require("toggle-pane"):entry("min-preview")
+end
+
+require("smart-enter"):setup({
+ open_multi = true,
+})
+
+require("full-border"):setup({
+ type = ui.Border.PLAIN, -- or ui.Border.ROUNDED
+})
+
+th.git = th.git or {}
+th.git.modified_sign = "M"
+th.git.deleted_sign = "D"
+th.git.added_sign = "A"
+th.git.untracked_sign = "?"
+th.git.ignored_sign = "X"
+th.git.updated_sign = "U"
+
+require("git"):setup()
+
+require("mactag"):setup({
+ keys = {
+ r = "Red",
+ o = "Orange",
+ y = "Yellow",
+ g = "Green",
+ b = "Blue",
+ p = "Purple",
+ },
+ colors = {
+ Red = "#ee7b70",
+ Orange = "#f5bd5c",
+ Yellow = "#fbe764",
+ Green = "#91fc87",
+ Blue = "#5fa3f8",
+ Purple = "#cb88f8",
+ },
+})
+
+require("folder-rules"):setup()