Extracting The Window (titlebar) Name From A Bash Script?

Home » CentOS » Extracting The Window (titlebar) Name From A Bash Script?
CentOS 2 Comments

Surely there’ s a way to obtain the “window name” -which appears on the Window Manager’ s Titlebar- for running processes, right?. Well, I can’t find it…

I mean, the names that appear below each icon when you alt-tab to switch an app to the foreground. Is there a simple way to obtain that data along with matching PIDs, from a Bash script? any built-in tools that provide such?

TIA
FC

2 thoughts on - Extracting The Window (titlebar) Name From A Bash Script?

  • Fernando Cassia wrote:

    wmctrl with the ‘-l -p’ flags provides a list of windows with names and PIDs. It’s in EPEL for CentOS 6, though not 5. It probably wouldn’t be too hard to build for CentOS 5 if you needed it there.

    Ron

  • Thanks a bunch Ron!.

    Exactly what I needed. This is one of those situations where a Google search brings more noise than signal, due to the generic nature of the terms involved (do a Google search for “find Window name” and see).
    :)

    I’m using CentOS 6 so that’s not a problem. Thanks again!.

    FC

LEAVE A COMMENT