Place Holder Projects Code
Bash MySQL JavaScript MySQL Quick Reference
Notes Documents Return of the Fed Login

Kill what you Click

Sometimes a process w/ a window hangs.  Imagine a recursive shell command with a typo.

Get the offending process's pid via click, and kill in one command:

 kill -9 $(xprop _NET_WM_PID | cut -d' ' -f3)

Here -9 tells kill to send SIGKILL, which can't be caught/ignored by the target.

xprop reports X server window properties.  The _NET_WM_PID property contains the pid, and we cut the 3rd field separated by a space to get just the pid.

Finally, the $(...) bashism substitutes the retrieved pid into the kill command, resulting in kill -9 "pid of what you clicked"