summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-09-16 17:25:15 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-09-16 17:25:15 +0530
commita40603b25bce5641f93a42b181660f1e3a8fc328 (patch)
tree4a3ca4c3b6d9425b5252787037e34afbfa0f2cff /.scripts
parent2a0c7751ef222e3de2002ab938f5b09e6cafc673 (diff)
pidkillall- adding telegram exception case
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/pidkillall5
1 files changed, 3 insertions, 2 deletions
diff --git a/.scripts/pidkillall b/.scripts/pidkillall
index faf8705..f4c0e6c 100755
--- a/.scripts/pidkillall
+++ b/.scripts/pidkillall
@@ -3,7 +3,8 @@
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
+##pname of telegram-desktop is displayed as telegram-deskto
+[ "$psout" == telegram-deskto ] && psout=telegram-desktop
+
killall $psout 2>/dev/null &&
[ -n "$psout" ] && dunstify "Terminated all processes Successfully" "$psout was killed" -i skull
-
-