arco zshrc
This commit is contained in:
208
.zshrc
208
.zshrc
@@ -1,87 +1,83 @@
|
||||
###
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
#installation via script from github
|
||||
#export ZSH="/home/$USER/.oh-my-zsh"
|
||||
#installation via paru -S oh-my-zsh-git
|
||||
export ZSH=/usr/share/oh-my-zsh/
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
# if you installed the package oh-my-zsh-powerline-theme-git then you type here "powerline" as zsh theme
|
||||
ZSH_THEME="random"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)
|
||||
|
||||
# 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"
|
||||
|
||||
# Uncomment the following line to automatically update without prompting.
|
||||
# DISABLE_UPDATE_PROMPT="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS=true
|
||||
|
||||
# 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.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# 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?
|
||||
# Standard 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=(git)
|
||||
|
||||
if [ -f $ZSH/oh-my-zsh.sh ]; then
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.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"
|
||||
fi
|
||||
|
||||
source ~/.config/shell/alias.sh
|
||||
export EDITOR=nvim
|
||||
export VISUAL=$EDITOR
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export PATH="$HOME/.bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
#unsetopt beep # try disabling annoying beep sounds
|
||||
setopt nobeep
|
||||
autoload -Uz compinit # load completion
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
setopt autocd # allow cd by only entering directory without cd command
|
||||
setopt extendedglob # Extended globbing. Allows using regular expressions with *
|
||||
setopt correct # Auto correct mistakes
|
||||
setopt numericglobsort # Sort filenames numerically when it makes sense
|
||||
setopt appendhistory
|
||||
setopt GLOB_DOTS
|
||||
#share commands between terminal instances or not
|
||||
unsetopt SHARE_HISTORY
|
||||
#setopt SHARE_HISTORY
|
||||
|
||||
zstyle ':completion:*' special-dirs true # complete hidden directories
|
||||
zstyle ':completion:*' special-files true # complete hidden files
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
||||
zstyle ':completion:*' menu select # enable navigable menu for completion
|
||||
zstyle ':completion:*' rehash true # Automatically update PATH entries
|
||||
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' # Smart matching of dashed values, e.g. f-b matching foo-bar
|
||||
zstyle ':completion:*' group-name '' # Group results by category
|
||||
zstyle ':completion:*' insert-tab false # Don't insert a literal tab when trying to complete in an empty buffer
|
||||
zstyle ':completion:*' completer _complete _ignored _correct _approximate # Enable approximate completions
|
||||
zstyle ':completion:*' verbose true # Verbose completion results
|
||||
#zstyle ':completion:*' show-completer true
|
||||
#zstyle ':completion:*' matcher-list 'r:|[._-'\''"`´,;:]=** r:|=**'
|
||||
#zstyle ':completion:*' original true
|
||||
#zstyle :compinstall filename '/home/en/.zshrc'
|
||||
# Show message while waiting for completion
|
||||
|
||||
# Pretty messages during pagination
|
||||
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
|
||||
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
|
||||
|
||||
# Nicer format for completion messages
|
||||
#zstyle ':completion:*:descriptions' format '%U%B%d%b%u' #shows categories of commands like "built-in" and "external"
|
||||
#zstyle ':completion:*:corrections' format '%U%F{green}%d (errors: %e)%f%u'
|
||||
#zstyle ':completion:*:warnings' format '%F{202}%BSorry, no matches for: %F{214}%d%b'
|
||||
|
||||
# Prettier completion for processes
|
||||
#zstyle ':completion:*:*:*:*:processes' force-list always
|
||||
zstyle ':completion:*:*:*:*:processes' menu yes select
|
||||
zstyle ':completion:*:*:*:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,args -w -w"
|
||||
|
||||
|
||||
autoload -Uz bracketed-paste-magic # allow links to be read without escaping
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
||||
|
||||
#bindkey -e # use emacs key layout
|
||||
bindkey '^[[1;5D' backward-word # 'CTRL + leftarrow'
|
||||
bindkey '^[[1;5C' forward-word # 'CTRL + rightarrow'
|
||||
bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace
|
||||
bindkey '^[[3~' delete-char # enable delete key
|
||||
bindkey '^[[3;5~' kill-word # 'CTRL + DEL'
|
||||
bindkey '^Z' undo # 'CTRL + z' undo last action
|
||||
|
||||
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
@@ -100,35 +96,41 @@ fi
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
|
||||
#### ARCOLINUX SETTINGS ####
|
||||
|
||||
if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
||||
ZSH_HIGHLIGHT_STYLES[default]=none
|
||||
#ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=009,standout
|
||||
#ZSH_HIGHLIGHT_STYLES[alias]=fg=white,bold
|
||||
#ZSH_HIGHLIGHT_STYLES[builtin]=fg=white,bold
|
||||
#ZSH_HIGHLIGHT_STYLES[function]=fg=white,bold
|
||||
#ZSH_HIGHLIGHT_STYLES[command]=fg=white,bold
|
||||
#ZSH_HIGHLIGHT_STYLES[precommand]=fg=#eaff00,bold
|
||||
#ZSH_HIGHLIGHT_STYLES[commandseparator]=none
|
||||
#ZSH_HIGHLIGHT_STYLES[hashed-command]=fg=009
|
||||
#ZSH_HIGHLIGHT_STYLES[path]=fg=214,underline
|
||||
#ZSH_HIGHLIGHT_STYLES[globbing]=fg=063
|
||||
#ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=white,underline
|
||||
#ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=none
|
||||
#ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=none
|
||||
#ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
|
||||
#ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=063
|
||||
#ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=063
|
||||
#ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=009
|
||||
#ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=009
|
||||
#ZSH_HIGHLIGHT_STYLES[assign]=none
|
||||
fi
|
||||
|
||||
setopt GLOB_DOTS
|
||||
#share commands between terminal instances or not
|
||||
unsetopt SHARE_HISTORY
|
||||
#setopt SHARE_HISTORY
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # load fish-completion, needs to be sourced after syntax highlighting
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#737373,bg=translucent"
|
||||
|
||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
|
||||
# Make nano the default editor
|
||||
|
||||
export EDITOR='nano'
|
||||
export VISUAL='nano'
|
||||
|
||||
#PS1='[\u@\h \W]\$ '
|
||||
|
||||
if [ -d "$HOME/.bin" ] ;
|
||||
then PATH="$HOME/.bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.local/bin" ] ;
|
||||
then PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
|
||||
Reference in New Issue
Block a user