Skip to content

alias update #3

@DokaDev

Description

@DokaDev
# --- [ Tmux Control Centre Switch ] ---
# tcc: Enable iTerm2 Control Centre mode (Inject session variable)
alias tcc='export TMUX_IT_MODE="-CC"; ts'
# txx: Revert to standard terminal mode (Unset variable)
alias txx='unset TMUX_IT_MODE; ts'

# --- [ Tmux Status Command ] ---
alias ts='_tmux_status'

# --- [ Dynamic Wrapper Function ] ---
function _t_wrap() {
    local cmd=$1
    shift
    # Execute tmux with the -CC flag if TMUX_IT_MODE is present
    if [[ -n "$cmd" ]]; then
        tmux ${TMUX_IT_MODE} "$cmd" "$@"
    else
        tmux ${TMUX_IT_MODE} "$@"
    fi
}

# --- [ Command Aliases ] ---
alias tm='_t_wrap'
alias tn='_t_wrap new -s'
alias ta='_t_wrap attach -t'
alias tl='tmux ls' # Always display as text list regardless of mode
alias tkas='tmux kill-server'
alias tks='_t_wrap kill-session -t'
alias trs='_t_wrap rename-session -t'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions