Skip to content

Instantly share code, notes, and snippets.

@wchargin
Created January 14, 2014 05:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchargin/8413363 to your computer and use it in GitHub Desktop.
Save wchargin/8413363 to your computer and use it in GitHub Desktop.
Identify process by X window (like xkill but for info)
#!/bin/sh
xprop | awk '($1=="_NET_WM_PID(CARDINAL)") {print $3}' | xargs ps h -o pid,cmd | xargs notify-send
#!/bin/sh
xprop | awk '($1=="_NET_WM_PID(CARDINAL)") {print $3}' | xargs ps h -o pid,cmd
@wchargin
Copy link
Author

Put in /usr/bin/ and chmod a+rx to use. Then, run xwhich from a terminal or gxwhich from AltF2 or a similar GUI launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment