Two new plugins: battery & Syncthing status bar info #4136
johnwoltman
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I put together a writerdeck from an old Dell laptop and decided to use Micro as my text editor. I wanted to see the battery capacity (and if it was charging) and also if my files were synced to my main computer with Syncthing. I wrote two plugins, one for battery, one for Syncthing.
I've never written any Lua before so it's mostly cobbled together from the existing scripts. The Syncthing API returns JSON which I couldn't figure out how to do in Micro's version of Lua, so I wrote a Python script that the plugin calls.
Here's what it looks like running on the writerdeck. I put both the battery and the Syncthing status on the right side of the status bar.
The battery plugin is at https://codeberg.org/johnwoltman/micro-batt-status and the Syncthing plugin is at https://codeberg.org/johnwoltman/micro-syncthing-status.
Beta Was this translation helpful? Give feedback.
All reactions