Skip to content

Commit

Permalink
Make vscode always create new tmux sessions and always create separat…
Browse files Browse the repository at this point in the history
…e new sessions
  • Loading branch information
NVolcz committed Dec 13, 2024
1 parent 922ee41 commit ec0041b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ if command_exists tmux && [ -z "$TMUX" ]; then
client_cnt=$(tmux list-clients | wc -l)
if [ "$client_cnt" -ge 1 ]; then
session_name=$base_session"-"$client_cnt
tmux new-session -d -t "$base_session" -s "$session_name"
tmux new-session -t "$base_session" -s "$session_name"
# Only set destroy-unattached on subsequent sessions to preserve the original session
tmux -2 attach-session -t "$session_name" \; set-option destroy-unattached
else
tmux -2 attach-session -t "$base_session"
Expand Down
5 changes: 4 additions & 1 deletion config/config/Code/User/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
"workbench.iconTheme": "material-icon-theme",
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120,
"dev.containers.dockerPath": "podman"
"dev.containers.dockerPath": "podman",
"terminal.integrated.env.linux": {
"TMUX": ""
}
}

0 comments on commit ec0041b

Please sign in to comment.