mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(yazi): plugins
This commit is contained in:
parent
382064dc29
commit
db94167c59
6 changed files with 62 additions and 32 deletions
2
tools/yazi/.gitignore
vendored
Normal file
2
tools/yazi/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
flavors/
|
||||
plugins/
|
||||
18
tools/yazi/init.lua
Normal file
18
tools/yazi/init.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
-- ~/.config/yazi/init.lua
|
||||
function Linemode:size_and_mtime()
|
||||
local time = math.floor(self._file.cha.mtime or 0)
|
||||
if time == 0 then
|
||||
time = ""
|
||||
elseif os.date("%Y", time) == os.date("%Y") then
|
||||
time = os.date("%b %d %H:%M", time)
|
||||
else
|
||||
time = os.date("%b %d %Y", time)
|
||||
end
|
||||
|
||||
local size = self._file:size()
|
||||
return string.format("%s %s", size and ya.readable_size(size) or "-", time)
|
||||
end
|
||||
|
||||
-- require("dual-pane"):setup({ enabled = true })
|
||||
require("starship"):setup()
|
||||
require("yaziline"):setup()
|
||||
5
tools/yazi/package.toml
Normal file
5
tools/yazi/package.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[plugin]
|
||||
deps = [{ use = "dawsers/dual-pane", rev = "c2fed12" }, { use = "Rolv-Apneseth/starship", rev = "d1cd0a3" }, { use = "llanosrocas/yaziline", rev = "864572c" }]
|
||||
|
||||
[flavor]
|
||||
deps = [{ use = "yazi-rs/flavors:catppuccin-mocha", rev = "fd85060" }, { use = "yazi-rs/flavors:catppuccin-latte", rev = "fd85060" }, { use = "dangooddd/kanagawa", rev = "d98f0c3" }]
|
||||
|
|
@ -1,2 +1,6 @@
|
|||
[manager]
|
||||
show_hidden = true
|
||||
show_hidden = true
|
||||
linemode = "size_and_mtime"
|
||||
|
||||
[preview]
|
||||
wrap = "yes"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue