mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-16 03:53:54 +00:00
feat(config): fish configs and tmux auto-open
This commit is contained in:
10
config/fish/functions/open-tmux.fish
Normal file
10
config/fish/functions/open-tmux.fish
Normal file
@@ -0,0 +1,10 @@
|
||||
# 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'
|
||||
if test -z "$SSH_TTY"
|
||||
if not set -q TMUX
|
||||
tmux attach-session -t main || tmux new-session -s main
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user