summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2021-01-01 17:05:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2021-01-01 17:05:47 +0100
commitb3b2b889cb0cb645384bab179b2620a97c1a24d3 (patch)
treec406f75c1bfb99d7f95e14a51dca9741106eab81
parent68944cb4b812b42a9d7d8752810fea01496b02e0 (diff)
downloadbin-b3b2b889cb0cb645384bab179b2620a97c1a24d3.zip
bin-b3b2b889cb0cb645384bab179b2620a97c1a24d3.tar.gz
add killp
-rwxr-xr-xkillp4
1 files changed, 4 insertions, 0 deletions
diff --git a/killp b/killp
new file mode 100755
index 0000000..530a951
--- /dev/null
+++ b/killp
@@ -0,0 +1,4 @@
+#! /bin/sh
+P=$(ps -u $USER -o pid,%mem,%cpu,comm | sort -b -k2 -r | sed -n '2!p' | dmenu -i -l 15 | awk '{print $1}')
+kill -15 $P 2>/dev/null
+notify-send "$P killed"