Replies: 2 comments 3 replies
-
I was able to modify the status line by copying Status:render into init.lua in the yazi config directory. What variable would I use to display the modified time of the current file? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'm not a Rust programmer and not sure how to do this. The code I have is below. What would I need to add? I want the modified time to be before the percentage.
function Status:render(area)
self.area = area
local left = ui.Line { self:mode(), self:size(), self:name() }
local right = ui.Line { self:percentage(), self:position() }
return {
ui.Paragraph(area, { left }),
ui.Paragraph(area, { right }):align(ui.Paragraph.RIGHT),
table.unpack(Progress:render(area, right:width())),
}
end
…On Tue, Apr 9, 2024, at 18:09, 三咲雅 · Misaki Masa wrote:
Use `modified` <https://yazi-rs.github.io/docs/plugins/types#shared.cha>, you can check out the linemode implementation:
https://github.com/sxyazi/yazi/blob/884de41b6606d805d9465004b5b3ce7758e065d8/yazi-plugin/preset/components/folder.lua#L19-L21
—
Reply to this email directly, view it on GitHub <#885 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALLYYRJGHKHNHMRNS3ZAVJDY4SGLHAVCNFSM6AAAAABF3LF3UGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANRUHE4DM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to do this?
Beta Was this translation helpful? Give feedback.
All reactions