Toxblh / MTMR

🌟 [My TouchBar My rules]. The Touch Bar Customisation App for your MacBook Pro
https://mtmr.app
MIT License
4.21k stars 219 forks source link

Possible to reload configuration on the fly? #132

Open jacobsmith opened 5 years ago

jacobsmith commented 5 years ago

Hello,

Thanks for your work on this project! I'm beginning to look at integrating this with some Vim plugins that I have written and was wondering if there was a way to pass an alternative config file - i.e., if I'm working in a JavaScript file, I might have a custom configuration for MTMR that calls out to some specific functionality, like a JS only refactoring plugin, etc. but then in a Ruby file it would have different commonly used functions.

My current thought is to overwrite the default items.json entry with each of those (since it should auto reload based on filesystem events), but I wasn't sure if there was a better way to respond to dynamic buttons like that.

thanks for any insights you can provide!

Toxblh commented 5 years ago

to next release

Toxblh commented 5 years ago

One moment - it's already should work with items.json, on every save the file touchbar will reload this. But about watch for custom files will be in next release.

jacobsmith commented 5 years ago

sweet, thanks! I'll write something to backup the "default" items.json, overwrite it with a context-specific version, and then put it back in place when that context is over.