feat(yazi): added symlink info on the status bar

This commit is contained in:
Sergio Laín 2023-11-25 21:45:47 +01:00
parent 8938c280b6
commit 84c4f999c4
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
3 changed files with 16 additions and 1 deletions

12
.config/yazi/symlink.lua Normal file
View file

@ -0,0 +1,12 @@
function Status:name()
local h = cx.active.current.hovered
if h == nil then
return ui.Span("")
end
local linked = ""
if h.link_to ~= nil then
linked = " -> " .. tostring(h.link_to)
end
return ui.Span(" " .. h.name .. linked)
end

View file

@ -3,6 +3,9 @@
# : Manager {{{
[manager]
folder_offset = [2, 0, 2, 0]
preview_offset = [2, 1, 2, 1]
cwd = { fg = "#8bd5ca" }
# Hovered

View file

@ -71,4 +71,4 @@ bizarre_retry = 5
enabled = false
[plugins]
preload = ["~/.config/yazi/ui.lua"]
preload = ["~/.config/yazi/ui.lua", "~/.config/yazi/symlink.lua"]