Update zsh config
This commit is contained in:
parent
d7fcef10bf
commit
a2db048e2d
|
@ -1448,7 +1448,7 @@
|
|||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
|
||||
|
||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
echo "user-zlogout">>/var/tmp/testi
|
||||
/usr/local/bin/timew stop
|
|
@ -1,8 +1,14 @@
|
|||
# Commands
|
||||
|
||||
neofetch
|
||||
task next limit:3
|
||||
timew
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
|
@ -12,68 +18,36 @@ export PATH=$HOME/bin:$HOME/.local/bin:$PATH
|
|||
export ZSH=~/.local/share/oh-my-zsh
|
||||
DEFAULT_USER=$USER
|
||||
|
||||
ZSH_COMPDUMP="/var/tmp/zcompdump-$ZSH_VERSION"
|
||||
ZSH_DISABLE_COMPFIX=true
|
||||
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
export TERM="xterm-256color"
|
||||
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir rbenv vcs) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs time)
|
||||
#ZSH_CUSTOM=$ZSH/custom
|
||||
|
||||
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir rbenv vcs)
|
||||
#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs time)
|
||||
HIST_STAMPS="yyyy-mm-dd" # history command timestamps
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
# COMPLETION
|
||||
# ENABLE_CORRECTION="true" # Correct command arguments
|
||||
HYPHEN_INSENSITIVE="true" # - and _ interchangeable
|
||||
COMPLETION_WAITING_DOTS="true" # Dots while waiting for completion
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true" # DOn't mark untracked files as dirty - speeds up status check
|
||||
|
||||
# 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"
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# 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/
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
# Plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
plugins=(
|
||||
git
|
||||
git-extras
|
||||
z
|
||||
fast-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
zsh-vim-mode
|
||||
git
|
||||
git-extras
|
||||
z
|
||||
fast-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
#zsh-vim-mode
|
||||
)
|
||||
|
||||
SHELL_CONFIG="$HOME/.config/shell"
|
||||
ZSH_CONFIG="$HOME/.config/zsh"
|
||||
|
||||
fpath=($fpath "$ZSH_CONFIG/zsh_completion")
|
||||
_comp_options+=(globdots) # Show files starting with dot in autocomplete
|
||||
fpath=($fpath "$ZSH_CONFIG/zsh_completion") # Custom completions
|
||||
ZSH_COMPDUMP="$(xdg-user-dir CACHE)/zsh/zcompdump-$ZSH_VERSION" # Cache completions
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
@ -122,9 +96,10 @@ zle -N fancy-ctrl-z
|
|||
bindkey '^z' fancy-ctrl-z
|
||||
bindkey '^q' push-line-or-edit
|
||||
|
||||
#bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# Manual VIM bindings - disabled, replaced by plugin {{{
|
||||
#bindkey -v
|
||||
#autoload -Uz history-search-end
|
||||
#
|
||||
#zle -N history-beginning-search-backward-end history-search-end
|
||||
|
@ -138,8 +113,9 @@ export KEYTIMEOUT=1
|
|||
# '^[OA' history-beginning-search-backward-end \
|
||||
# '^[[B' history-beginning-search-forward-end \
|
||||
# '^[OB' history-beginning-search-forward-end
|
||||
# }}}
|
||||
|
||||
# Show time on the right after executing command
|
||||
# Show time on the right after executing command - obsolete through powerlevel10k {{{
|
||||
# strlen() {
|
||||
# FOO=$1
|
||||
# local zero='%([BSUbfksu]|([FB]|){*})'
|
||||
|
@ -165,21 +141,19 @@ export KEYTIMEOUT=1
|
|||
# echo -e "${RDATE}"
|
||||
# fi
|
||||
# }
|
||||
|
||||
# }}}
|
||||
|
||||
## User configuration
|
||||
|
||||
source "$SHELL_CONFIG/functions"
|
||||
|
||||
#fpath=($fpath "$SHELL_CONFIG/zsh_completion")
|
||||
#compinit -d /var/tmp/zcompdump-$ZSH_VERSION
|
||||
|
||||
# turn on spelling correction
|
||||
setopt correct
|
||||
# don't save duplicates in command history
|
||||
setopt histignoredups
|
||||
|
||||
setopt extended_glob
|
||||
|
||||
# Enable zmv
|
||||
autoload zmv
|
||||
alias zmv='noglob zmv'
|
||||
|
@ -188,32 +162,16 @@ alias zcp='noglob zmv -C'
|
|||
alias zln='noglob zmv -L'
|
||||
alias zsy='noglob zmv -Ls'
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='nvim'
|
||||
fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
||||
|
||||
# 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="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
# AUTOMATICALLY ADDED SHIT
|
||||
|
||||
if [ -d "~/.sdkman" ]; then
|
||||
export SDKMAN_DIR="~/.sdkman"
|
||||
|
@ -229,3 +187,5 @@ export NVM_DIR="$HOME/.nvm"
|
|||
|
||||
# To customize prompt, run `p10k configure` or edit .p10k.zsh.
|
||||
[[ ! -f $ZSH_CONFIG/.p10k.zsh ]] || source $ZSH_CONFIG/.p10k.zsh
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
|
Loading…
Reference in New Issue