Im trying to find a way to get list of active applications with names and icons of them.
Actually, I'm using this command to get all active processes.
wmctrl -lp
Sample output:
0x03800002 0 3293 user-notebook XdndCollectionWindowImp
0x03800007 0 3293 user-notebook unity-launcher
0x02c0000a 0 3471 user-notebook Desktop
0x03800011 0 3293 user-notebook unity-panel
0x03800016 0 3293 user-notebook unity-panel
0x0380001b 0 3293 user-notebook unity-dash
0x0380001c 0 3293 user-notebook Hud
0x04400001 0 3838 user-notebook Google - Google Chrome
0x04e00041 0 4159 user-notebook App - [~/Projects/app] - PhpStorm 2017.1.4
0x05400001 0 4231 user-notebook Slack - HelloCh
0x05a00001 0 7909 user-notebook Skype for Linux Beta
0x06400001 0 15203 user-notebook Spotify
0x06c000b6 0 4819 user-notebook [Screenshot from 2017-10-30 15-03-56] (imported)-1.0 (RGB color, 1 layer) 3286x1080 – GIMP
Now I don't know how to get icons of each process. Also I don't like names of processes, It would be awesome to get real names of apps eg. instead of:
Stack Overflow - Where Developers Learn, Share, & Build Careers - Google Chrome
I want real app name only:
Google Chrome
Can't use regex, because all apps are giving different kind of titles.
Is there any way to get this work, using unix commands only or bash scripts?
Basically I want to get same data like in app switcher in ubuntu (ALT+TAB)
Thanks