Aggiornato layout, inserito stub configurazione tmux.
This commit is contained in:
parent
23b66b5aa6
commit
099625169d
12 changed files with 84 additions and 21 deletions
2
zsh/plugins/tmux.extra.conf
Normal file
2
zsh/plugins/tmux.extra.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
set -g default-terminal $ZSH_TMUX_TERM
|
||||
source-file $ZSH_TMUX_CONFIG
|
1
zsh/plugins/tmux.only.conf
Normal file
1
zsh/plugins/tmux.only.conf
Normal file
|
@ -0,0 +1 @@
|
|||
set -g default-terminal $ZSH_TMUX_TERM
|
|
@ -1,20 +1,8 @@
|
|||
# vim:sts=2:sw=2:ft=zsh
|
||||
# Taken from: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/tmux/tmux.plugin.zsh
|
||||
#
|
||||
if ! (( $+commands[tmux] )); then
|
||||
print "zsh tmux plugin: tmux not found. Please install tmux before using this plugin." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# ALIASES
|
||||
|
||||
alias ta='tmux attach -t'
|
||||
alias tad='tmux attach -d -t'
|
||||
alias ts='tmux new-session -s'
|
||||
alias tl='tmux list-sessions'
|
||||
alias tksv='tmux kill-server'
|
||||
alias tkss='tmux kill-session -t'
|
||||
|
||||
# CONFIGURATION VARIABLES
|
||||
# Automatically start tmux
|
||||
: ${ZSH_TMUX_AUTOSTART:=false}
|
||||
|
@ -42,6 +30,16 @@ alias tkss='tmux kill-session -t'
|
|||
# Set -u option to support unicode
|
||||
: ${ZSH_TMUX_UNICODE:=false}
|
||||
|
||||
# ALIASES
|
||||
|
||||
alias ta='tmux attach -t'
|
||||
alias tad='tmux attach -d -t'
|
||||
alias ts='tmux new-session -s'
|
||||
alias tl='tmux list-sessions'
|
||||
alias tksv='tmux kill-server'
|
||||
alias tkss='tmux kill-session -t'
|
||||
alias tmuxconf='$EDITOR $ZSH_TMUX_CONFIG'
|
||||
|
||||
# Determine if the terminal supports 256 colors
|
||||
if [[ $terminfo[colors] == 256 ]]; then
|
||||
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
|
||||
|
@ -75,7 +73,11 @@ function _zsh_tmux_plugin_run() {
|
|||
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
|
||||
|
||||
# Try to connect to an existing session.
|
||||
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
|
||||
if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then
|
||||
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach -t $ZSH_TMUX_DEFAULT_SESSION_NAME
|
||||
else
|
||||
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
|
||||
fi
|
||||
|
||||
# If failed, just run tmux, fixing the TERM variable if requested.
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
@ -85,9 +87,9 @@ function _zsh_tmux_plugin_run() {
|
|||
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
|
||||
fi
|
||||
if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then
|
||||
$tmux_cmd new-session -s $ZSH_TMUX_DEFAULT_SESSION_NAME
|
||||
$tmux_cmd new-session -s $ZSH_TMUX_DEFAULT_SESSION_NAME
|
||||
else
|
||||
$tmux_cmd new-session
|
||||
$tmux_cmd new-session
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue