refactoring

This commit is contained in:
Matt Nish-Lapidus 2025-03-21 16:50:54 -04:00
parent 74ae1150a3
commit 69400c1aa3
142 changed files with 11 additions and 70 deletions

View file

@ -0,0 +1,33 @@
function hovered()
local hovered = cx.active.current.hovered
if hovered then
return hovered
else
return ""
end
end
local function setup(_, options)
options = options or {}
local config = {
symlink_color = options.symlink_color or "silver",
}
if Yatline ~= nil then
function Yatline.coloreds.get:symlink()
local symlink = {}
local linked = ""
local h = hovered()
if h.link_to ~= nil then
linked = " -> " .. tostring(h.link_to)
end
table.insert(symlink, { linked, config.symlink_color })
return symlink
end
end
end
return { setup = setup }