summaryrefslogtreecommitdiffstats
path: root/.local/bin/td-toggle
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-04-11 10:03:33 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-04-11 10:03:33 -0400
commit080365dd22b967274833f50a5cd0cccc0790a658 (patch)
treeac187a4c8e8d29a34092e64ed0650d6c79ee35bc /.local/bin/td-toggle
parent7b9277ae0b061af6890786a9149b7e26aa380e2b (diff)
downloadeibhear-080365dd22b967274833f50a5cd0cccc0790a658.tar.gz
eibhear-080365dd22b967274833f50a5cd0cccc0790a658.tar.zst
eibhear-080365dd22b967274833f50a5cd0cccc0790a658.zip
pgrep is a little slow, slower than ps | grep
Diffstat (limited to '.local/bin/td-toggle')
-rwxr-xr-x.local/bin/td-toggle2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle
index 46bb183..fb8620f 100755
--- a/.local/bin/td-toggle
+++ b/.local/bin/td-toggle
@@ -1,7 +1,7 @@
#!/bin/sh
# If transmission-daemon is running, will ask to kill, else will ask to start.
-if pgrep -x transmission-da >/dev/null ;
+if ps ax | grep -q "\stransmission-daemon$" ;
then
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed."
else