Skip to content

Instantly share code, notes, and snippets.

@dsaran
Created February 14, 2014 16:01
Show Gist options
  • Save dsaran/9003633 to your computer and use it in GitHub Desktop.
Save dsaran/9003633 to your computer and use it in GitHub Desktop.
Get PID of a window on X
xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/_NET_WM_PID\(CARDINAL\)/{print $NF}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment