LUASTATUS-PLUGIN-MEM-USAGE-LINUX(7)

πŸ“¦
version 0.6.0 Β· 2 versions
, in nixos 26.05

πŸ’– luastatus-mem-usage-linux(7) πŸ’–

Hey bestie, welcome to this little page from the Miscellaneous Information Manual, section 7. It’s giving β€œLinux-specific memory usage plugin for luastatus” energy, and we’re gonna get into it. 🫢✨


🌸 Name 🌸

luastatus-mem-usage-linux β€” a Linux-specific memory usage plugin for luastatus. Periodt. πŸ’…


✨ Overview ✨

Okay so this is a derived plugin: it periodically polls Linux procfs for memory usage. Lowkey iconic, highkey useful. πŸ¦‹


πŸŽ€ Functions πŸŽ€

  • get_usage() β€” returns a table with two entries, avail and total. Both are tables that have value (a number) and unit (a string) entries; you can assume unit is always "kB". No cap, that’s the whole vibe. πŸ’–
  • widget(tbl) β€” constructs a widget table required by luastatus. tbl is a table with these fields:
    • (required) πŸ”₯
      • cb: function β€” the callback that will be called with the table same as that returned by get_usage(). So it’s basically getting the same little table get_usage() hands you. πŸŽ€
    • (optional) 🌈
      • timer_opts: table β€” options for the underlying timer plugin.
      • event β€” the event entry of the resulting table (see luastatus documentation for the description of widget.event field). Iykyk. πŸ‘‘

LGPLv3 β€” legal slay, bestie. πŸ§šπŸ’œ


Signed off from the Miscellaneous Information Manual, section 7 β€” luastatus-mem-usage-linux(7). No date stamped on this one, just pure LGPLv3 energy at the end. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from