Skip to content

Instantly share code, notes, and snippets.

@fritschy
Created February 9, 2017 11:16
Show Gist options
  • Select an option

  • Save fritschy/d1ccc23e2c16bd77a6cfa7b3a324614d to your computer and use it in GitHub Desktop.

Select an option

Save fritschy/d1ccc23e2c16bd77a6cfa7b3a324614d to your computer and use it in GitHub Desktop.
#!/bin/sh
S="$1"
set -eu
I=$(xdpyinfo | grep focus:\ | cut -d\ -f4)
P=$(xprop -id $I | grep -m 1 _NET_WM_PID | cut -d\ -f3)
kill $S $P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment