Skip to content
Discussion options

You must be logged in to vote

Return an empty string from your custom linemode function if you want to hide it, for example:

function Linemode:custom()
  if ui.area("current").w < 60 then
    return ""
  end
  local year = os.date("%Y")
  local time = (self._file.cha.mtime or 0) // 1
  if time > 0 and os.date("%Y", time) == year then
    time = os.date("%b %d %H:%M", time)
  else
    time = time and os.date("%b %d  %Y", time) or ""
  end

  local size = self._file:size()
  local size_str = size and ya.readable_size(size):gsub(" ", "") or "-"
  local perms = (self._file.cha and self._file.cha:perm()) or "----------"

  return ui.Line(string.format(" %s %s %s ", size_str, time, perms))
end

Increase or decrease 60 as needed

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@og900aero
Comment options

Answer selected by og900aero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
1. Q&A
Labels
None yet
2 participants