aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgruake4
1 files changed, 1 insertions, 3 deletions
diff --git a/gruake b/gruake
index 4e6987e..6f2fc7f 100755
--- a/gruake
+++ b/gruake
@@ -4,9 +4,7 @@
# Powered by urxvt+tmux.
################################################################################
-if pid=$(pgrep -f 'urxvt.*gruake'); then
- kill "$pid"
-else
+if ! pkill -f 'urxvt.*gruake'; then
if [ -t 0 ]; then
# If running in a tty, spawn terminal in background
urxvt -name gruake -e sh -c 'tmux new -A -s gruake' &