-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a touch bar widget inside of a group #41
Comments
Do you need to create a button in the runtime by JS? What's the usecase? Basically this library will do anything that BTT allows. And there's no action for creating widgets/button on the fly afair. Maybe there were some APIs for that but to be honest I'm not But you can create a button within a group and manage it later, yes. There's Thanks for your interest in the library! |
I'm creating groups containing buttons with very similar actions. It would be a lot quicker to do this using a config array or file, creating buttons on the fly when BTT starts. I came to your library from https://community.folivora.ai/t/dynamically-generated-widgets/2316 which seems to imply dynamically creating widgets is possible, then to the last few lines in clock-widget.js below. How am I misunderstanding this?
|
ah yes sorry. I'm not sure about placing them in groups though, I don't think this is the case I've handled. I'll look around and let you know, though don't expect a clean solution for now, more like a hacky-but-maybe-working one :) |
I'll make some enquiries with BTT. |
Grabbing the JSON for a group of buttons seems to contain button data. I may have been looking at this from the wrong end. I'll play some more, let you know what I find. |
You'd have to create a new group on the fly or update existing one. You can use For example:
Should theoretically create a new group with 3 buttons. Buttons are the array under It should work, may require a little bit of playing around with it but makes sense. I cannot test it though and won't be able to anytime soon :( |
Thanks. And no worries, you've been more than helpful. |
cool! closing for now, feel free to reopen / mention me if you find any obstacles |
Checking out the example clock-widget.js, is it possible to create, say, a button widget inside of a group in the Touch Bar?
The text was updated successfully, but these errors were encountered: