Programmatically Getting Name of Front-most (currently running) application in Unity
Posted
by
NHDaly
on Ask Ubuntu
See other posts from Ask Ubuntu
or by NHDaly
Published on 2013-06-25T20:01:26Z
Indexed on
2013/06/25
22:29 UTC
Read the original article
Hit count: 239
unity
|shell-scripting
I am trying to write a script that executes differently depending on the currently active program, and I am wondering if there is any way to find this programatically.
For example, I come from the Mac world, and in Apple's Applescript you can do the following:
set appPath to the path to the frontmost application
set appName to the name of file appPath
and that will give you the name of the currently running application.
Is there anything similar that I can do in ubuntu-land?
Thanks!
© Ask Ubuntu or respective owner