Jump to content

Can Alfred check for which Desktop Space I am in?


Recommended Posts

I recently had to start using all my work applications within Microsoft Remote Desktop (MRD). I want to use that in its own macOS Desktop Spaceimage.thumb.png.489d726ccfa9010671bfaa824eebd77a.png

If I am in a macOS Space, I want OPT+B to bring CHROME.app into focus, but if I am in the MRD space, I want OPT+B to trigger a macro that brings MRD into focus (and runs a macro in Keyboard Maestro for me).

Can Alfred check which space is in focus?

Link to comment
  • 4 weeks later...

@gedeyenite You can find your current Desktop Space by looking at the "com.apple.spaces" plist. It's located at "~/Library/Preferences/com.apple.spaces.plist", but you can read it from Terminal or a shell script using the "defaults read com.apple.spaces" command.

 

Each Space has a name/uuid (they're one in the same). There's a "Current Space" field that contains the uuid of the current Space, and a "Space Properties" field that contains the name of all the Spaces currently available. If you can figure out a script that matches the "Current Space" uuid with that of whichever Space your app is in, you should have a good basis for the workflow you're trying to accomplish.

Link to comment
  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...