diff --git a/home/user/.config/tmux/scripts/attach_session.sh b/home/user/.config/tmux/scripts/attach_session.sh index f1323f5..69f23d0 100755 --- a/home/user/.config/tmux/scripts/attach_session.sh +++ b/home/user/.config/tmux/scripts/attach_session.sh @@ -23,5 +23,5 @@ session_to_attach="$("${tmux_list_sessions_script}" | fzf | awk '{printf $1}')" readonly session_to_attach if [ -n "${session_to_attach}" ]; then - tmux switch-client -t "${session_to_attach}" + tmux switch-client -t "${session_to_attach}" -c "$(tmux display -p '#{client_tty}')" fi diff --git a/home/user/.config/tmux/scripts/start_projects.sh b/home/user/.config/tmux/scripts/start_projects.sh index 23dac40..ffb26bc 100755 --- a/home/user/.config/tmux/scripts/start_projects.sh +++ b/home/user/.config/tmux/scripts/start_projects.sh @@ -32,4 +32,4 @@ if ! tmux has-session -t="${session}" 2>/dev/null; then tmux new-session -d -n 1 -c "${project_dir}" -s "${session}" fi -tmux switch-client -t "${session}" +tmux switch-client -t "${session}" -c "$(tmux display -p '#{client_tty}')" diff --git a/home/user/.tmux/dotfiles b/home/user/.tmux/dotfiles index 0f4fa7c..6fcf161 100755 --- a/home/user/.tmux/dotfiles +++ b/home/user/.tmux/dotfiles @@ -16,4 +16,4 @@ if ! tmux has-session -t="${SESSION}"; then tmux send-keys -t "${SESSION}:${MAINW}.2" ':Telescope find_files' Enter fi -tmux switch-client -t "${SESSION}" +tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')" diff --git a/home/user/.tmux/landing b/home/user/.tmux/landing index 6c4a0ea..57b051d 100755 --- a/home/user/.tmux/landing +++ b/home/user/.tmux/landing @@ -12,4 +12,4 @@ if ! tmux has-session -t="${SESSION}"; then tmux rename-window -t="${SESSION}:1" "${MAINW}" fi -tmux switch-client -t "${SESSION}" +tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')" diff --git a/home/user/.tmux/sandbox b/home/user/.tmux/sandbox index 8f62428..6513868 100755 --- a/home/user/.tmux/sandbox +++ b/home/user/.tmux/sandbox @@ -21,4 +21,4 @@ WORKING_PROJECT="$(mktemp -td "${SESSION}.XXXX")" readonly WORKING_PROJECT tmux new-session -s "${SESSION}" -d -c "${WORKING_PROJECT}" -tmux switch-client -t "${SESSION}" +tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')" diff --git a/home/user/.tmux/ssh b/home/user/.tmux/ssh index 240721f..4de7a61 100755 --- a/home/user/.tmux/ssh +++ b/home/user/.tmux/ssh @@ -31,4 +31,4 @@ if ! tmux has-session -t="${SESSION}" 2>/dev/null; then tmux new-session -s "${SESSION}" -c "${HOME}" -d -n "1" "TERM=xterm-256color ssh ${choosed_ssh_server} || read" fi -tmux switch-client -t "${SESSION}" +tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')" diff --git a/home/user/.tmux/system-update b/home/user/.tmux/system-update index 72754da..2e28614 100755 --- a/home/user/.tmux/system-update +++ b/home/user/.tmux/system-update @@ -16,4 +16,4 @@ if ! tmux has-session -t="${SESSION}"; then tmux send-keys -t "${SESSION}:${MAINW}.2" ':Lazy' Enter fi -tmux switch-client -t "${SESSION}" +tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"