mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
10 lines
422 B
Fish
10 lines
422 B
Fish
# Description: Open tmux session if not already open
|
|
# Dependencies: tmux
|
|
# Usage: open-tmux
|
|
function open-tmux --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
|
|
# Check if not in an SSH session and not already in a tmux session
|
|
if test -z "$SSH_TTY"; and not set -q TMUX
|
|
command tmux attach-session -t main || command tmux new-session -s main
|
|
end
|
|
end
|