Skip to content

Add ability to extend with custom commands

I really like the aesthetics of the plugin and would like to extend it with extra bars, e.g. for disk usage, remaining battery, etc. I know that there are other plugins to display that, but I appreciate the minimalism of this one and would like to avoid clutter.

It is unavoidable that any extension will require a significant rewrite of the codebase, which currently is not very modular and hardcodes logic for different bars, e.g. a single function fetches both RAM and SWAP usage. While battery could be relatively easily added as a 5th option, usage of specific disk (or disks), requires some rearchitecturing.

I think the best way to handle it and any future extension would be to allow user to specify arbitrary command or script returning a value from 0 to 100 representing percentage of bar filled. The existing ones which mostly call other processes anyway, should only serve as presets.