blob: e06b8830a5ffb0eee7eaa78b467748775e986cfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
-- mod-version:3 --lite-xl 2.1
-- original implementation by AqilCont
local core = require "core"
local style = require "core.style"
local StatusView = require "core.statusview"
core.status_view:add_item(
nil,
"status:memory-usage",
StatusView.Item.RIGHT,
function()
return {
style.text,
string.format(
"%.2f MB",
(math.floor(collectgarbage("count") / 10.24) / 100)
)
}
end,
nil,
1,
"lua memory usage"
).separator = core.status_view.separator2
|