matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.5k stars 642 forks source link

Golang scripting with Tengo #819

Open gedw99 opened 2 years ago

gedw99 commented 2 years ago

https://github.com/d5/tengo

It’s a golang written binary that allows users to write golang ( ish ) scripts

it can be easily compiled into xbar as it’s just golang.

Why ?

It’s easy to add tengo to xbar and it provides a cross platform scripting language, which can make it easier for users that might not have ruby or python installed .

There is a tengo cli also

tengo scripts can also be compiled to binaries which maybe has sone merit

it also formalises the inputs and outputs to and from a script and so would allow parametric scripts for xbar . You might have a script but you want it to lookup 2 different things on the internet . With parametrische the 2 input properties could be inputted by xbar . Xbar could have a simple kv or SQLite store or even just a json file for storing these inputs . So it makes it much easier for users that want parametrics.

I know this is a little bit off base but I am curious if you find this useful ?

please feel free to ask me questions if my explanation is not clear