diff options
author | justsaumit <justsaumit@draconyan.xyz> | 2022-03-01 19:54:04 +0530 |
---|---|---|
committer | justsaumit <justsaumit@draconyan.xyz> | 2022-03-01 19:54:04 +0530 |
commit | 98bbe7bd7fcec209e2408ff0b086858715ca89e0 (patch) | |
tree | d7597d75bbcc7d2b9621693c89058b77c8d504b2 /scripts/pidkill | |
parent | 588af889ea41d9dfeb7f2c47c1a7af4de65b4406 (diff) |
updated
Diffstat (limited to 'scripts/pidkill')
-rwxr-xr-x | scripts/pidkill | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/pidkill b/scripts/pidkill new file mode 100755 index 0000000..e1b69e8 --- /dev/null +++ b/scripts/pidkill @@ -0,0 +1,9 @@ +#!/bin/sh + +prok=$(ps -u $USER -o pid,%mem,%cpu,comm | sort -b -k2 -r | sed -n '1!p' | dmenu -i -l 15 ) +pid=$(echo $prok | awk '{print $1}') +pname=$(echo $prok | awk '{print $4}') + +kill -15 $pid 2>/dev/null +dunstify "Terminated process Successfully" "$pname was killed" + |