Aggiornato layout, inserito stub configurazione tmux.

This commit is contained in:
Emiliano Vavassori 2023-04-29 15:32:22 +02:00
parent 23b66b5aa6
commit 099625169d
12 changed files with 84 additions and 21 deletions

View file

@ -0,0 +1,3 @@
# Configurations for Manjaro
source /usr/share/zsh/manjaro-zsh-config
source /usr/share/zsh/manjaro-zsh-prompt

View file

@ -0,0 +1 @@
source /usr/share/powerlevel9k/powerlevel9k.zsh-theme

View file

@ -0,0 +1,2 @@
set -g default-terminal $ZSH_TMUX_TERM
source-file $ZSH_TMUX_CONFIG

View file

@ -0,0 +1 @@
set -g default-terminal $ZSH_TMUX_TERM

View file

@ -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