~tmpod/memusage-lite

Tiny plugin to show lite's memory usage
9357b706 — Tmpod 2 years ago
Micro tweaks + badges for tickets and lists
e764f0e2 — Tmpod 2 years ago
Updated screenshot
7aa3d9a3 — Tmpod 2 years ago
Simplified the config

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~tmpod/memusage-lite
read/write
git@git.sr.ht:~tmpod/memusage-lite

You can also use your local clone with git send-email.

tickets mailing lists

#memusage-lite

A simple plugin for lite that adds a toggleable display of how much memory the Lua virtual machine is using.

#Installing

Navigate to your data/plugins directory and then use one of the following methods:

  1. Just download the plugin file into your plugins folder.

    curl -O https://git.sr.ht/~tmpod/memusage-lite/blob/master/memusage.lua
    
  2. Clone this repository into your plugins folder. This allows you to easily update the plugin by doing git pull but it fetches unnecessary files, such as this README.

    git clone https://git.sr.ht/~tmpod/memusage-lite
    

#Usage

This is a "passive" plugin, thus not requiring any user interaction to work. However, you can toggle it with the Memusage: Toggle command.

You can also configure it, as explained in the next section.

#Configurations

This plugin has three configuration fields. You can set these configurations by editing your init.lua file in the data/user lite directory and modifying the core.config table. Each field name should be prefixed with memusage_, for example, memusage_color. Here's a description of each valid configuration field:

Name Type Description
active boolean Whether to start the display when lite starts
color int[] RGBA color values to use for the text (alpha value is optional)
coords function () return int, int Function taking no arguments that returns the x and y coordinates to render the text on

Example:

local config = require "core.config"

-- Won't start displaying when lite is opened
config.memusage_active = false
-- Text will be of a purplish-pinkish color
config.memusage_color = {191, 90, 236}

#Screenshots

Example configuration

#License

This plugin is licensed under MIT. The license file can be found here.