Hi,
Title says it all I guess: Is there a way to use the connection of a Thunderbolt / usb-c docking station to trigger Keyboard Maestro actions?
Ideally what I would like to acomplish:
Working on a i9 macbook I tend use Spaces for apps. I'm don't know if there's ways to automate Spaces.
In the office, I connect to an older Caldigit TS2 thunderbolt docking station. As the i9 macbook has 4 ubc-c / Thunderbolt ports, I need to use the Apple Thunderbolt 3 (usb-c) to Thunderbolt 2 adapter cable.
Ideally I would like to transform 3 Spaces to show up / move to 3 connected monitors. (Or 3 specific monitor locations (x, y & window size)
So that when connecting the dock, the Apps in the Spaces would show up on their respective monitor in their respective position. (supposin you have a very large monitor e.g. 49")
What I was thinking of:
System Information shows a particular UID, Vendor Name, Device ID.
Is that something that can be used in a trigger?
Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.
This is definitely possible. I don’t use Spaces, so I can’t speak to the desired content of your macro, but I can shed some light on how to trigger it.
For example, I have a few macros that are triggered when I attach my TB4 dock. I use either the Power Status Changed trigger or the USB Device trigger for this. My first action is an if, which runs a shell script to determine if my particular device in question (for instance, my Stream Deck, ASUS monitor, Logitech speakers etc.) are connected. I have included one of my macros as an example on which you can base your own.
This example is triggered when my MBP is connected to power (since my TB4 dock provides power) or when my Stream Deck is connected/disconnected. Regardless of triggering method, the shell script returns a list of attached USB devices, and if the Stream Deck appears in that list, the macro launches the SD software (among other things); otherwise it quits the software. Again, this is just an example of how you can do things based on USB devices being connected/disconnected, as well as power status changes, since a lot of Thunderbolt docks also provide power when attached.
Let me know if you have any questions and we can chat further!
I am looking to do something similar, only I am trying to monitor a Thunderbolt cable that gets connected to my MacBook Pro. is there any way to monitor for (Device Name:MacBookPro17,1) as it appears there is no way to monitor of the thunderbolt cable even though it is USB-C.
Perhaps you could use the USB Device trigger to detect when the cable is attached/detached? If it shows up in the device tree it might work. Try this example macro, and if it doesn’t work we can think of something else.
As I suspected this Thunderbolt device is not seen as a USB device. I have looked for anything that I could use as a trigger under System Report and cannot find anything.
Hopefully you may have an idea that I have overlooked....Thx
Might not help you about triggering by thunderbolt connection to you MacBook, but I am able to use the connection of my HP Thunderbolt Dock G2 as a trigger as it also show up as an USB-hub: