aboutsummaryrefslogtreecommitdiff
path: root/plugins/memoryusage.lua
blob: d6ad20db8c8f7b0dd1f4fc4b9d056f7ff4cde627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- mod-version:1 -- lite-xl 2.00
-- original implementation by AqilCont
local style = require "core.style"
local StatusView = require "core.statusview"

local get_items = StatusView.get_items

function StatusView:get_items()
  local left, right = get_items(self)
  local t = {
    style.text, (math.floor(collectgarbage("count") / 10.24) / 100) .. " MB",
    style.dim, self.separator2,
  }
  for i, item in ipairs(t) do
    table.insert(right, i, item)
  end
  return left, right
end