displaying free space #1895
Unanswered
reklatekoy
asked this question in
1. Q&A
Replies: 1 comment
-
Add to Status:children_add(function()
local handle = io.popen("df -h . | tail -n 1")
local status = handle:read("a*")
handle:close()
local size, avail = status:match("%S+%s+(%d+%a)%s+%d+%a%s+(%d+%a)")
local bg = "#89b4fa"
local fg = "#1e1e2e"
return ui.Line {
ui.Span(THEME.status.separator_open):fg(bg),
ui.Span(avail):fg(fg):bg(bg),
ui.Span("/"):fg(fg):bg(bg),
ui.Span(size):fg(fg):bg(bg),
ui.Span(THEME.status.separator_close):fg(bg),
}
end, 500, Status.RIGHT) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
st
yazi --debug
outputDescribe the question
how can I add "free disk space" to the panel?
in the same way as it is done in ranger
Anything else?
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions