aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Ramos2022-01-20 11:57:06 +0100
committerGuillermo Ramos2022-01-20 11:57:06 +0100
commit873f7db8b02637d75dfd5b709f0a33fa529175e5 (patch)
treeacb2d95dce049f86241b1761ce642246aa5a3e7c
parente6ff299df50fe5db6037a0800144a22e4157b2c6 (diff)
downloadcli-873f7db8b02637d75dfd5b709f0a33fa529175e5.tar.gz
gruake: simplify
-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' &