A bin folder, holding helpfull scripts and commands
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tmux_default 286B

1234567891011121314
  1. #!/bin/sh
  2. #
  3. for s in $(tmux list-sessions -F '#{session_name}'); do
  4. p=$(tmux list-panes -F '#{pane_tty}' -t "$s")
  5. if [ "$p" = "$(tty)" ]; then
  6. # Session already running
  7. exit 0
  8. fi
  9. done
  10. tmux attach-session -t default_ssh || tmux new-session -s default_ssh