Added support for starship and did some cleanup
This commit is contained in:
parent
8539579b65
commit
0aa8fdde46
|
@ -1,23 +0,0 @@
|
||||||
set-option -g prefix C-a
|
|
||||||
bind-key C-a last-window
|
|
||||||
bind-key a send-prefix
|
|
||||||
#set -g mode-mouse off
|
|
||||||
#set -g mouse-resize-pane off
|
|
||||||
#set -g mouse-select-pane off
|
|
||||||
#set -g mouse-select-window off
|
|
||||||
set -g base-index 1
|
|
||||||
set -s escape-time 0
|
|
||||||
setw -g aggressive-resize on
|
|
||||||
setw -g monitor-activity on
|
|
||||||
set -g visual-activity on
|
|
||||||
set -g status-left ' #[fg=blue,bold]#h #S:#I.#P (#D) #[default]'
|
|
||||||
set -g status-right '#T #[fg=yellow,bold]#(uptime | cut -d, -f4 | cut -d " " -f 4-7)#[default] #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default] '
|
|
||||||
set -g status-fg '#EEEEEE'
|
|
||||||
set -g status-bg '#333333'
|
|
||||||
set -g set-titles on
|
|
||||||
bind-key e set-window-option synchronize-panes on
|
|
||||||
bind-key E set-window-option synchronize-panes off
|
|
||||||
bind m set -g mode-mouse on \; set -g mouse-resize-pane on \; set -g mouse-select-pane on \; set -g mouse-select-window on \; display 'Mouse: ON'
|
|
||||||
bind M set -g mode-mouse off \; set -g mouse-resize-pane off \; set -g mouse-select-pane off \; set -g mouse-select-window off \; display 'Mouse: OFF'
|
|
||||||
bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
|
|
||||||
bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
|
|
|
@ -1,52 +0,0 @@
|
||||||
set guifont=Fira\ Code\ 11
|
|
||||||
|
|
||||||
set encoding=utf-8
|
|
||||||
|
|
||||||
set nocompatible
|
|
||||||
colorscheme murphy
|
|
||||||
syntax on
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
" Uncomment the following to have Vim jump to the last position when
|
|
||||||
" reopening a file
|
|
||||||
if has("autocmd")
|
|
||||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
||||||
\| exe "normal! g'\"" | endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Uncomment the following to have Vim load indentation rules according to the
|
|
||||||
" detected filetype. Per default Debian Vim only load filetype specific
|
|
||||||
" plugins.
|
|
||||||
if has("autocmd")
|
|
||||||
filetype indent on
|
|
||||||
endif
|
|
||||||
|
|
||||||
set showcmd " Show (partial) command in status line.
|
|
||||||
set showmatch " Show matching brackets.
|
|
||||||
set smartcase " Do smart case matching
|
|
||||||
set incsearch " Incremental search
|
|
||||||
set ww=b,s,<,>,[,]
|
|
||||||
set sta
|
|
||||||
set visualbell
|
|
||||||
set mousemodel=popup_setpos
|
|
||||||
|
|
||||||
highlight SpellErrors ctermfg=Red guifg=Red cterm=underline gui=underline term=reverse
|
|
||||||
let spell_language_list = "americanxlg,american,americanmed+,english"
|
|
||||||
let spell_insert_mode = 1
|
|
||||||
let spell_executable = "ispell"
|
|
||||||
let spell_auto_type = ""
|
|
||||||
"let spell_auto_type = "tex,mail,text,html,sgml,otl,cvs,none"
|
|
||||||
|
|
||||||
" other
|
|
||||||
set shiftwidth=2
|
|
||||||
set tabstop=8
|
|
||||||
set softtabstop=2
|
|
||||||
set expandtab
|
|
||||||
filetype plugin indent on
|
|
||||||
autocmd FileType yaml setl indentkeys-=<:>
|
|
||||||
autocmd FileType yaml setlocal ts=8 sts=2 sw=2 expandtab
|
|
||||||
|
|
||||||
set modeline
|
|
||||||
set modelines=7
|
|
||||||
|
|
||||||
" vim: syntax=vim
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 48a3c2f32d1a4643db367eed4d6c53768c3847b1
|
Subproject commit dac3314c76e799cddbbe5cf63870d31861626059
|
|
@ -0,0 +1,81 @@
|
||||||
|
|
||||||
|
format = """
|
||||||
|
\\[$username@$hostname\\] $directory \
|
||||||
|
$git_branch\
|
||||||
|
$git_commit\
|
||||||
|
$git_state\
|
||||||
|
$git_status\
|
||||||
|
$kubernetes\
|
||||||
|
$docker_context\
|
||||||
|
$aws\
|
||||||
|
$terraform\
|
||||||
|
$package\
|
||||||
|
$cmake\
|
||||||
|
$golang\
|
||||||
|
$helm\
|
||||||
|
$java\
|
||||||
|
$nodejs\
|
||||||
|
$perl\
|
||||||
|
$php\
|
||||||
|
$python\
|
||||||
|
$rust\
|
||||||
|
$nix_shell\
|
||||||
|
$memory_usage\
|
||||||
|
$env_var\
|
||||||
|
$cmd_duration\
|
||||||
|
$custom\
|
||||||
|
$jobs\
|
||||||
|
$status
|
||||||
|
$time $character\
|
||||||
|
"""
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
min_time = 0
|
||||||
|
show_milliseconds = true
|
||||||
|
format = " [ ⏱ $duration](bold blue)"
|
||||||
|
|
||||||
|
[time]
|
||||||
|
disabled = false
|
||||||
|
time_format = "%FT%T"
|
||||||
|
format = "[$time]($style)"
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[git_state]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
truncation_length = 0
|
||||||
|
truncate_to_repo = false
|
||||||
|
read_only = " 🔒"
|
||||||
|
format = "\\[[$path]($style)\\][$read_only](bold yellow)"
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
disabled = false
|
||||||
|
ssh_only = false
|
||||||
|
format = "[$hostname]($style)"
|
||||||
|
|
||||||
|
[username]
|
||||||
|
disabled = false
|
||||||
|
show_always = true
|
||||||
|
format = "[$user]($style)"
|
||||||
|
|
||||||
|
[status]
|
||||||
|
format = '[ \[$symbol $status\]]($style) '
|
||||||
|
map_symbol = true
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
only_with_files = false
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[aws]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[kubernetes]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[terraform]
|
||||||
|
disabled = false
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2afeff1529ec85d0c5ced5ece3714c2220b646a5
|
Subproject commit 108f76b628a0df927df142036f1fdec829a5ff00
|
|
@ -1 +1 @@
|
||||||
Subproject commit ae315ded4dba10685dbbafbfa2ff3c1aefeb490d
|
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
|
@ -1 +1 @@
|
||||||
Subproject commit 773ead6ea7b579106624851404d4f651acd5e042
|
Subproject commit d4511c23659381b56dec8be8c8553b7ff3dc5fd8
|
|
@ -1 +1 @@
|
||||||
Subproject commit ebef4e55691f62e630318d56468e5798367aa81c
|
Subproject commit dffe304567c86f06bf1be0fce200077504e79783
|
76
zshrc
76
zshrc
|
@ -15,10 +15,7 @@ typeset -U PATH path fpath
|
||||||
path=( /bin /sbin /usr/bin /usr/sbin $path )
|
path=( /bin /sbin /usr/bin /usr/sbin $path )
|
||||||
[[ -d ~/bin ]] && path=( ~/bin $path )
|
[[ -d ~/bin ]] && path=( ~/bin $path )
|
||||||
|
|
||||||
# sdkman support
|
|
||||||
[[ -f ~/.sdkman/bin/sdkman-init.sh ]] && source ~/.sdkman/bin/sdkman-init.sh
|
[[ -f ~/.sdkman/bin/sdkman-init.sh ]] && source ~/.sdkman/bin/sdkman-init.sh
|
||||||
|
|
||||||
# nvm
|
|
||||||
[[ -f /usr/share/nvm/init-nvm.sh ]] && source /usr/share/nvm/init-nvm.sh
|
[[ -f /usr/share/nvm/init-nvm.sh ]] && source /usr/share/nvm/init-nvm.sh
|
||||||
|
|
||||||
# jaesve support
|
# jaesve support
|
||||||
|
@ -54,59 +51,24 @@ fi
|
||||||
|
|
||||||
path+=( $GOPATH/bin ${GOROOT+${GOROOT}/bin} )
|
path+=( $GOPATH/bin ${GOROOT+${GOROOT}/bin} )
|
||||||
|
|
||||||
|
# check for starship
|
||||||
|
if which starship &>/dev/null && [[ ! -e ~/.no-starship ]]
|
||||||
|
then
|
||||||
|
export _STARSHIP_Y_="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH=$PSOXIZSH/oh-my-zsh
|
export ZSH=$PSOXIZSH/oh-my-zsh
|
||||||
export ZSH_CACHE_DIR=~/.cache/zsh
|
export ZSH_CACHE_DIR=~/.cache/zsh
|
||||||
[[ ! -d $ZSH_CACHE_DIR ]] && mkdir -p $ZSH_CACHE_DIR
|
[[ ! -d $ZSH_CACHE_DIR ]] && mkdir -p $ZSH_CACHE_DIR
|
||||||
|
|
||||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
[[ -z "$ZSH_THEME" ]] && [[ -z "$_STARSHIP_Y_" ]] && export ZSH_THEME="stemmet"
|
||||||
# it'll load a random theme each time that oh-my-zsh is loaded.
|
|
||||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
|
||||||
#ZSH_THEME="rkj-repos"
|
|
||||||
[[ -z $ZSH_THEME ]] && export ZSH_THEME="stemmet"
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
|
||||||
# CASE_SENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
|
||||||
# sensitive completion must be off. _ and - will be interchangeable.
|
|
||||||
# HYPHEN_INSENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
|
||||||
DISABLE_AUTO_UPDATE="true"
|
DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
|
||||||
export UPDATE_ZSH_DAYS=3
|
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
|
||||||
# DISABLE_LS_COLORS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
|
||||||
# DISABLE_AUTO_TITLE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
|
||||||
# ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
|
||||||
COMPLETION_WAITING_DOTS="true"
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
|
||||||
# much, much faster.
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
# Uncomment the following line if you want to change the command execution time
|
|
||||||
# stamp shown in the history command output.
|
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
HIST_STAMPS="yyyy-mm-dd"
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
|
||||||
ZSH_CUSTOM=$(dirname $ZSH)/zsh-custom
|
ZSH_CUSTOM=$(dirname $ZSH)/zsh-custom
|
||||||
|
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
|
||||||
plugins=(
|
plugins=(
|
||||||
$pre_plugins
|
$pre_plugins
|
||||||
zsh_reload
|
zsh_reload
|
||||||
|
@ -114,7 +76,7 @@ plugins=(
|
||||||
common-aliases
|
common-aliases
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
)
|
)
|
||||||
( which git &>/dev/null ) && plugins+=( git git-extras git-flow-avh ) && [[ "$ZSH_THEME" == "stemmet" ]] && [ -z "$STARSHIP_SHELL" ] && plugins+=( git-prompt )
|
( which git &>/dev/null ) && plugins+=( git git-extras git-flow-avh ) && [[ "$ZSH_THEME" == "stemmet" ]] && [ -z "$_STARSHIP_Y_" ] && plugins+=( git-prompt )
|
||||||
( which perl &>/dev/null ) && plugins+=( perl )
|
( which perl &>/dev/null ) && plugins+=( perl )
|
||||||
( which go &>/dev/null ) && plugins+=( golang )
|
( which go &>/dev/null ) && plugins+=( golang )
|
||||||
( which oc &>/dev/null ) && plugins+=( oc )
|
( which oc &>/dev/null ) && plugins+=( oc )
|
||||||
|
@ -182,13 +144,6 @@ end
|
||||||
source $PSOXIZSH/zsh-custom/zshnip/zshnip.zsh
|
source $PSOXIZSH/zsh-custom/zshnip/zshnip.zsh
|
||||||
( which lxc &>/dev/null ) && source $PSOXIZSH/zsh-custom/lxd-completion-zsh/_lxc
|
( which lxc &>/dev/null ) && source $PSOXIZSH/zsh-custom/lxd-completion-zsh/_lxc
|
||||||
|
|
||||||
# User configuration
|
|
||||||
|
|
||||||
# export MANPATH="/usr/local/man:$MANPATH"
|
|
||||||
|
|
||||||
# You may need to manually set your language environment
|
|
||||||
# export LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
( which vi &>/dev/null ) && export EDITOR='vi'
|
( which vi &>/dev/null ) && export EDITOR='vi'
|
||||||
( which vim &>/dev/null ) && export EDITOR='vim'
|
( which vim &>/dev/null ) && export EDITOR='vim'
|
||||||
( which nvim &>/dev/null ) && export EDITOR='nvim'
|
( which nvim &>/dev/null ) && export EDITOR='nvim'
|
||||||
|
@ -218,12 +173,6 @@ if which fzf &>/dev/null; then
|
||||||
which tmux &> /dev/null && export FZF_TMUX=1
|
which tmux &> /dev/null && export FZF_TMUX=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
||||||
# For a full list of active aliases, run `alias`.
|
|
||||||
#
|
|
||||||
# Example aliases
|
|
||||||
alias zshconfig="vim $PSOXIZSH/zshrc"
|
alias zshconfig="vim $PSOXIZSH/zshrc"
|
||||||
alias ohmyzsh="vim $PSOXIZSH/oh-my-zsh"
|
alias ohmyzsh="vim $PSOXIZSH/oh-my-zsh"
|
||||||
alias curlj="curl -H 'Content-Type: application/json' "
|
alias curlj="curl -H 'Content-Type: application/json' "
|
||||||
|
@ -273,7 +222,7 @@ precmd() {
|
||||||
export _DATE_=$(date -u +%Y%m%d)
|
export _DATE_=$(date -u +%Y%m%d)
|
||||||
export _TIME_=$(date -u +%H%M%S)
|
export _TIME_=$(date -u +%H%M%S)
|
||||||
export _DTTS_="${_DATE_}T${_TIME_}Z"
|
export _DTTS_="${_DATE_}T${_TIME_}Z"
|
||||||
if [[ ! -z $KUBECONFIG ]]
|
if [[ -n "$KUBECONFIG" && -z "$_STARSHIP_Y_" ]]
|
||||||
then
|
then
|
||||||
export KUBE_VARS=$(basename $KUBECONFIG)/$(kubectl config current-context)
|
export KUBE_VARS=$(basename $KUBECONFIG)/$(kubectl config current-context)
|
||||||
else
|
else
|
||||||
|
@ -281,8 +230,13 @@ precmd() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove unwanted aliases
|
if [[ -n "$_STARSHIP_Y_" ]]
|
||||||
|
then
|
||||||
|
[[ ! -e ~/.config/starship.toml ]] && install -v -D $PSOXIZSH/starship.toml ~/.config/starship.toml
|
||||||
|
source <(starship init zsh --print-full-init)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove unwanted aliases
|
||||||
( where fd | grep -qE '\/s?bin\/fd' ) && alias fd &>/dev/null && unalias fd
|
( where fd | grep -qE '\/s?bin\/fd' ) && alias fd &>/dev/null && unalias fd
|
||||||
|
|
||||||
# Clean up global aliases
|
# Clean up global aliases
|
||||||
|
|
Loading…
Reference in New Issue