I'm using Übersicht and I've created a custom menubar. I want to show the title of the current active app but my search-fu isn't great. I must be searching for it incorrectly so I figured I'd ask here.
Does such a command exist?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Well there is, however if you run it directly in Terminal it's just going to return Terminal, as that's the frontmost application process that's visible.
osascript -e 'tell application "System Events" to get name of application processes whose frontmost is true and visible is true'
If you want the second most, use:
osascript -e 'tell application "System Events" to get name of second application process whose visible is true'