mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-11-16 15:38:46 +00:00
Remove trailing log
minor correction on creating new session
This commit is contained in:
parent
28a7663014
commit
83c5dd098d
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
CURRENT_DIR="$( dirname "$0" )"
|
CURRENT_DIR="$( dirname "$0" )"
|
||||||
|
|
||||||
echo -e "\n$(date +%T) IN" >> /tmp/continuum
|
|
||||||
|
|
||||||
source "$CURRENT_DIR/helpers.sh"
|
source "$CURRENT_DIR/helpers.sh"
|
||||||
source "$CURRENT_DIR/variables.sh"
|
source "$CURRENT_DIR/variables.sh"
|
||||||
|
|
||||||
@ -16,12 +14,10 @@ clean_session() {
|
|||||||
local sessions_count="$(tmux list-sessions 2>/dev/null | wc -l)"
|
local sessions_count="$(tmux list-sessions 2>/dev/null | wc -l)"
|
||||||
|
|
||||||
if /usr/bin/tmux has-session -t "${tmux_server_session_temporary}"; then
|
if /usr/bin/tmux has-session -t "${tmux_server_session_temporary}"; then
|
||||||
# add a new session to preserve server daemon
|
# add a new session to preserve server daemon when killing temporary session
|
||||||
[ "${sessions_count}" = 1 ] && tmux new-session -d && \
|
[ "${sessions_count}" = 1 ] && tmux new-session
|
||||||
echo "$(date +%T) add session" >> /tmp/continuum
|
|
||||||
|
|
||||||
# kill session
|
# kill session
|
||||||
echo "$(date +%T) kill session" >> /tmp/continuum
|
|
||||||
/usr/bin/tmux kill-session -t "${tmux_server_session_temporary}"
|
/usr/bin/tmux kill-session -t "${tmux_server_session_temporary}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user