Get PID by Window

Get the PID of a process by it’s window:

$ xprop | awk '/PID/ {print $3}'

This will change your mouse cursor to a cross. Click on the window and get the PID printed on the terminal.