There is an Idle trigger which is probably better than using a periodic check (frequently periodic triggers will cause problems since a triggered macro will cancel things like the Conflict Palette).
OK, good to know. Question about the periodic triggers. Does a periodic trigger that, say, checks for the screensaver() have performance issues that I should be aware of? Or would there be a better way to check for that?
There is no trigger to detect when the screen saver is activated, so there is probably no better way to do it, however unless you manually activate the screen saver, the Idle trigger should be roughly equivalent anyway. If you manually activate the screen saver, change to using a macro that activates the screen saver and then performs your macro actions.
There is no steep performance issue with using a periodic macro every 5 seconds (not in terms of CPU or Energy, not unless the macro is fairly energy intensive itself). However, as I mentioned, since any macro triggering cancels things like the Conflict Palette, Typed String trigger sequences, and “for one action” macro groups, having any kind of periodic macro running continuously will have a negative impact.
Thanks for responding. I’ve fixed up the idle trigger to not use the periodic trigger.
I’ve also changed the Activity trigger to use the trigger “when Any Application activates”. It’s obviously not perfect. But it’s good enough for my purposes.
Unless you can think of another trigger for the opposite of idle.
Johns, do you plan on sharing your latest version?
Thanks Johns - this is awesome!
badges are a 'script' that I run which get a number that I can use to 'badge' my icon before pushing it to the stream deck button. I use Pillow for the icon drawing
This sounds intriguing -- is it making icons based on the script icons in keyboard maestro? Or is this strictly about placing updated numbers on icons that represent lists of items?
The script builds icons based on a PNG (base icon) and then I "Draw" the badge using Pillow (draw red circle, fill with number, etc...)
If you ever put that all up on GitHub it'd probably cause me to start learning Python. Sounds great.
I have every intention of moving it to GitHub. But now that I've returned to work (from the holidays) it's turned into a weekend project.. so .. slowly but surely
Stream Deck 4.01 has now SDK sets. Please PeterNLewis, embrace this piece of hardware!
A friend of mine got a Stream Deck and I was wondering about KM integration. Of course that led to this post and as a result (definitely further inspired by your post) I bit the bullet and bought it.
I'd love a more detailed look into your setup (database, etc.) as I would like to do something very similar. Did you ever set up a repo, or do you have a document that you could share explaining the process?
Since the release of the official SDK I decided to re-do everything as a StreamDeck SDK Plugin. I am using python, and you can follow along the StreamDeck SDK reddit channel. The learning curve, and mistakes, and lack of 'proper' logging and debugging have made progress slow, but I'm definitely getting there.
I have two plugins atm:
The first plugin is a simple plugin that executes a KM macro, I use it for git difftool, and to build the various apps I work on (StreamDeck plugin -> KM (AppleScript) -> Xcode)
Another Plugin I have working rn, has a button that shows the iTunes album art of the currently playing song (it updates when the song changes, or pauses), along with the current song's star rating as a 'label' at the bottom. The star rating updates if I update it via KM.
I am working on cleaning up the python plugin for GitHub and will let you know when it's up.
One other note, I seem to be the only person using Python as a 'native' code exe for my StreamDeck plugin. But it's working quite well.
Awesome - I actually went to Reddit and subscribed to StreamDeckSDK before posting earlier. I noticed a lot more node stuff, but I think I see a couple of your posts.
Thanks for pioneering here. I literally got my SD an hour ago and tested a quick "launch a macro" button, but I can't wait to dig in and see how to really make things happen.
Quick update... I just finished writing a KM plugin (in Python) that will run any macro (entered in the properties panel in StreamDeck) .. I'll bundle it up and put it on GitHub as soon as I have a chance.
This macro will serve as the 'base' for all integrations between KM and StreamDeck
If you're interested in source, DM me.
Early access.. no README.. I'll get to it
This is perfect. I literally just thought of the fact that you can launch specific macros through their ids (using the "Launch by Script"). I figured I'd look into that a little more and then I saw you posted this here. Your approach is exactly the one I was thinking about. Thanks!
Just updated the project to support multiple 'icons' (instances)... it's working really well. If you have any requests, please feel free to create an issue