summaryrefslogtreecommitdiff
path: root/.scripts/pidkillall
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-08-01 13:06:41 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-08-01 13:06:41 +0530
commita92b011530cbfa250700d403b4c706ad0240cd07 (patch)
treed7f0942c36ff6ec9014cba355b43ae96872d7c5f /.scripts/pidkillall
parent542d2e988b4b489b9038c55bcac919d0b026dbb8 (diff)
sxhkd pidkillall + blank notif correction
Diffstat (limited to '.scripts/pidkillall')
-rwxr-xr-x.scripts/pidkillall9
1 files changed, 9 insertions, 0 deletions
diff --git a/.scripts/pidkillall b/.scripts/pidkillall
new file mode 100755
index 0000000..86fad3c
--- /dev/null
+++ b/.scripts/pidkillall
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+psout=$(ps -u $USER -o pid,%cpu,%mem,comm | sed -n '1!p' | sort -b -k2 -r| cut --characters=1-18 --complement | awk '!x[$0]++'| dmenu -i -l 15 )
+//uniq without piping into sort before with the help of awk
+
+killall $psout 2>/dev/null &&
+[ -n $psout ] && dunstify "Terminated all processes Successfully" "$psout was killed"
+
+