When I switch desktops, I want to have a way to remind me of the purpose of that desktop. I'm thinking of using AppleScript to detect when I switch desktops, and show a pop up of sorts.

Desktops / popups would contain a label of some sort ("work", "communication", etc). I'm thinking of launching a browser window, bring it to front, and update the contents to say the purpose.

In my head this sounds doable, I just need to find the event, if any that is related to Spaces/MissionControl.

  • I won't post an "Answer" here. Just a "working answer": . . . You can use an indirect GUI "variable" to tell you where you are: . . . set AppleScript's text item delimiters to {"/"} . . _/¯. . tell application "System Events" to set BGpict to last text item of item 1 of (picture of every desktop as list) . . . which e.g. returns "Lion.jpg" on one of my 4 workspaces, "Sierra.jpg" on another, which means I was using desktop 3 first and desktop 1 right now. . . . (I assume you'll find ways to apply this "bit", considering your reputation …) Commented Nov 22, 2018 at 22:16

1 Answer 1


http://piyocast.com/as/archives/5502 https://www.youtube.com/watch?v=8kZbMs1LJt8&feature=youtu.be

You can detect the switch of desktop. Though, Full-screen mode is detected as desktop switching.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .