lowcase homedir

This commit is contained in:
Matt Nish-Lapidus 2025-06-22 23:40:17 -04:00
parent c7069c3b78
commit 706b07fd33
9 changed files with 76 additions and 59 deletions

View file

@ -149,3 +149,19 @@ rules = [
]
# : }}}
[icon]
dirs = [
{ name = ".config", text = "" },
{ name = ".git", text = "" },
{ name = "desktop", text = "" },
{ name = "documents", text = "" },
{ name = "downloads", text = "" },
{ name = "library", text = "" },
{ name = "movies", text = "" },
{ name = "music", text = "" },
{ name = "pictures", text = "" },
{ name = "sync", text = "" },
{ name = "videos", text = "" },
]

View file

@ -45,7 +45,7 @@ pref_by_location:setup({
-- show_hidden: true|false (Optional) https://yazi-rs.github.io/docs/configuration/yazi#mgr.show_hidden
-- Match any folder with name "Downloads"
{ location = ".*/Downloads", sort = { "mtime", reverse = true, dir_first = false }, linemode = "time_and_size" },
{ location = ".*/downloads", sort = { "mtime", reverse = true, dir_first = false }, linemode = "time_and_size" },
},
})

View file

@ -1,7 +1,7 @@
local function setup()
ps.sub("cd", function()
local cwd = cx.active.current.cwd
if cwd:ends_with("Downloads") then
if cwd:ends_with("downloads") then
ya.mgr_emit("sort", { "mtime", reverse = true, dir_first = false })
else
ya.mgr_emit("sort", { "alphabetical", reverse = false, dir_first = true })