Action based on currently used device

Hi,

Is there an action condition that would allow me to check for a device type I’m currently using ie. destkop or laptop? I have an action that places the window of an app in specific position when I press the hotkey combination but I want the window to be placed in different size/place depending on which device I’m currently using. I tried to use the “lid_angle” as a condition and it works fine on laptop, but on the desktop it fails even with angle value set to 0 - I assume that desktop version of the MacOS just doesn’t report back the “lid_angle” at all.

So my question is - is there any other conditional that would allow me to detect my current device - desktop or laptop? If not, maybe we could add some more conditional checks - some ideas - notch check, computer type, computer name, battery level or if battery exists at all, external monitor connected?

Also it kinda looks like a bug with desktop and “lid_angle” 0 being falsy. If the system doesn’t report it or the value is undefined/null, maybe we should treat it as 0?

Thanks for your help!

The easiest would be to use the "BetterTouchTool did launch on machine with serial number" trigger in "automations, named & other triggers" section. There you can e.g. use the switch to preset actions to load a specific preset for a specific machine.

Alternatively you can also use that trigger without entering a serial number and run some little script to determine your machine and save it to a variable

Thanks for the reply! Correct me if I’m wrong, but this would mean that I can’t use the keyboard hotkey to move the window to the desired position right? Let me give you a more background on this hotkey action - sometimes I move an application window by accident when I use ie. scrollbars and I just want to push the hotkey combination to bring it back in place. So the keyboard hotkey is the important part of it - I don’t want this action to happen only once, I want to trigger it manually when I need to :slight_smile:

you can put that hotkey in a machine specific preset. However if you just need this for a specific trigger, maybe the currently connected displays variable will work in a condition?

I have not thought about using profiles. I’ll try that. Thank you for the idea!