how can i get the PID or the ID Window from the terminal of the windows that is on top or that have the focus?
Last edited by giancarlogiesa (2012-09-22 13:16:04)
You can use the xdotool utility to get the pid of the active window like this:
xdotool getactivewindow getwindowpid
or the currently focused window like this:
xdotool getwindowfocus getwindowpid
thank you very much!