Unclear to me if this is or isn’t old news—that I was just bad at searching for—but I wanted to let more[1] people know regardless:

Context: I have set up safari to always open to specific tab groups on phone and iPad, to avoid losing tabs on inadvertent close and to ease pickup from Mac.

This is the safari that lives in my dock, but a large irritation was that on iPad it only worked to open safari fullscreen now (vs a drag onto screen split). So I was still having to go looking in the app switcher or use Spotlight (which I have on AssistiveTouch double tap) to find “real” safari

but I figured it out (ish*)

Screenshot of Shortcuts app with Transcribed steps:  ⑴ Get [Visible] apps; connected by propogation line to . ⑵ Count Items in Visible Apps; propline to ⑶ If [Count] is [less than or equal to] [1]; enclosing { 🄐⑷ Find [All] Tab Groups where [Title] [contains] “📟”  ; prop line to 🄐⑸ Get [First Item] from [Tab Group]; prop line to 🄐⑹  Open [⌃Item From List] } Otherwise { 🄑⑷ Get [First Item] from [ ⑴ Visible Apps] ; prop line to 🄑⑸ Split Screen between [⌃ Bundle Identifier] and [Safari] } End-if

https://www.icloud.com/shortcuts/02f75ac8f5b143049fb3420911191c2e

*caveats:

  1. the split is actually with a generic new safari window rather than one with my desired tab group … but I’ll take it over nothing
  2. it may behoove one to filter out the Shortcuts app explicitly rather than presume first is correct. It seems to list windows in opening order? I have only once so far (which isn’t zero times) ended up with a shortcuts/safari split closing something

It’d be fairly straightforward to add a branch for a 3 app count (if you pulled up to slide over on top of a split) and use open app as slideover there. I don’t do that much tho so haven’t bothered

It’s irritating that the type App drop down gives windows as an option but always returns an empty list (except on macOS), and “is frontmost” is there but it’s always false. So I’m not sure there’s a better detect than count without going to screenshot and quick image analysis ?

(Incidentally doing “view content graph” on a current app or visible apps appears to always freeze shortcuts - I have to lock and unlock to exit it)

If anyone has ideas about where to pull a split v slide over detection from lmk ; left v right detection would also be nice. Don’t think they are possible tho


  1. I couldn’t find such previously shown on /r/shortcuts, but when I tried sharing there its been spuriously automoded as mis-flaired question )for 3 hours & counting (beyond second attempt + modmail). Thats why above is quoted (although I added in alt text and title that cam from when:)

    I posted it on masto and bsky where I have few followers let alone ones who are likely interested, but also - I saw the shortcuts@lemmy.world federation when I was checking what hashtags might get it seen by someone - so welcome to my first lemmy post

    (I’d had an account on lemmy.ml since January 2022, but I’ve barely lurked let alone posed from there) ↩︎