Skip to content

Commit

Permalink
don't start a server in the background
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Sep 8, 2021
1 parent 071a643 commit 63ec667
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkgs/kak-session/kak-session.sh
Expand Up @@ -14,16 +14,8 @@ fi
SESSION=$(basename "$ROOT" | sed 's/\./-/g')

if ! kak -l | grep -q "$SESSION"; then
kak -d -s "$SESSION" &
disown $!
exec kak -s "$SESSION" "${@}"
else
exec kak -c "$SESSION" "${@}"
fi

for DELAY in 0 0 1 1 2; do
if kak -l | grep -q "$SESSION"; then
break
fi

sleep $DELAY
done

exec kak -c "$SESSION" "${@}"

0 comments on commit 63ec667

Please sign in to comment.