você pode usar wmctrl como base:
% wmctrl -a WIN
a única coisa que você precisa fazer é descobrir "WIN", que é o id da janela que corresponde a um determinado critério.
<WIN> This argument specifies the window. By default it's
interpreted as a string. The string is matched
against the window titles and the first matching
window is used. The matching isn't case sensitive
and the string may appear in any position
of the title.