diff --git a/conf.d/myabbrs.fish b/conf.d/myabbrs.fish index ef76a60..14ba030 100644 --- a/conf.d/myabbrs.fish +++ b/conf.d/myabbrs.fish @@ -1,7 +1,7 @@ abbr -a -- cl clear +abbr -a -- tm tmux abbr -a -- docker podman abbr -a -- g git -#abbr -a -- gs 'git status' abbr -a -- l ezals abbr -a -- ll 'ezals -TL2' abbr -a -- ls ezals @@ -13,4 +13,6 @@ abbr -a --position anywhere --command git -- c commit abbr -a --position anywhere --command git -- co checkout abbr -a --position anywhere --command git -- d diff abbr -a --position anywhere --command git -- s status +abbr -a --position anywhere --command tmux -- r rename +abbr -a --position anywhere --command tmux -- rw renamew diff --git a/config.fish b/config.fish index b3bb499..ce269cd 100644 --- a/config.fish +++ b/config.fish @@ -13,6 +13,14 @@ if status is-interactive bind -M insert \cn \\t fzf_configure_bindings --git_status=\cg --history=\cr --variables= --processes= - #zellij - tmux + # Check max tmux window in the Home session and open the Home session in a new tmux window + # Find max window number in the Home session + set tmux_max_windows_in_home (tmux list-windows -t Home | awk '{print $1}' | sed 's/[^0-9]*//g' | sort -n | tail -n 1) + if test -z "$TMUX" + if test -n "$SSH_CONNECTION" + tmux new-session -A -s Home + else + tmux new-session -A -s Home + end + end end