Terminal Command to get app switcher information?

0

The native app switcher orders the apps based on chronological focus. This ordering is useful to me for a script, but I'm not sure where this ordering information is stored.

Is there a way to get the app switcher list or something similar directly from terminal or applescript? Or a way to investigate where it might be?

I tried to search for this, but all of the results were about hiding apps from the switcher.

Karric

Posted 2018-12-21T21:00:46.423

Reputation: 131

Answers

1

Looking through the man index pages I was able to find a command that gives this information:

lsappinfo metainfo | grep bringForwardOrder

This lists the apps in the same order as the app switcher when invoked, along with the app ASN, which can be useful.

Karric

Posted 2018-12-21T21:00:46.423

Reputation: 131

1lsappinfo metainfo | grep bringForwardOrder | grep -E -o '"[^"]+"' | tr -d '"' – CJK – 2018-12-21T22:49:53.977