1
0
Fork 0

Upload files to ''

This commit is contained in:
MGislv 2022-07-19 18:13:04 +00:00
parent fe4c0e9301
commit a74592e244
1 changed files with 22 additions and 5 deletions

27
.zshrc
View File

@ -1,11 +1,12 @@
# Autocompletion # Autocompletion
autoload -Uz compinit promptinit autoload -Uz compinit promptinit vcs_info
compinit compinit
zmodload zsh/complist zmodload zsh/complist
promptinit promptinit
# Include hidden files # Include hidden files
_comp_options+=(globdots) _comp_options+=(globdots)
setopt prompt_subst
setopt extendedglob setopt extendedglob
setopt COMPLETE_ALIASES setopt COMPLETE_ALIASES
setopt autocd setopt autocd
@ -26,14 +27,22 @@ zstyle ':completion:*:functions' ignored-patterns '_*'
# Remove trailing directory slash # Remove trailing directory slash
zstyle ':completion:*' squeeze-slashes true zstyle ':completion:*' squeeze-slashes true
# Enable (only) git detection
zstyle ':vcs_info:*' enable git
# History # History
setopt hist_ignore_all_dups setopt hist_ignore_all_dups
HISTFILE="$HOME/.zsh/history" HISTFILE="$HOME/.zsh/history"
HISTSIZE=100000000 HISTSIZE=100000000
SAVEHIST=$HISTSIZE SAVEHIST=$HISTSIZE
# Functions
git_branch() {
git symbolic-ref --short HEAD 2> /dev/null
}
# Prompt theme # Prompt theme
precmd() { print -rP "%F{#ebcb8b}%n%f%F{#8fbcbb}@%F{#81a1c1}%m%f %F{#d08770}%B%~%b%f" } precmd() { print -rP "%F{#ebcb8b}%n%f%F{#8fbcbb}@%F{#81a1c1}%m%f %F{#d08770}%B%~%b%f %F{#a3be8c}$(git_branch)%f" }
PROMPT=' > ' PROMPT=' > '
eval $(dircolors ~/.dir_colors) eval $(dircolors ~/.dir_colors)
@ -48,6 +57,7 @@ bindkey "^[[B" history-beginning-search-forward
alias ls='ls -A --color=auto' alias ls='ls -A --color=auto'
alias l='ls -Ahl --color=auto' alias l='ls -Ahl --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias less='less -i'
alias vim=nvim alias vim=nvim
alias vi=nvim alias vi=nvim
alias cat=bat alias cat=bat
@ -55,7 +65,7 @@ alias cx=clear
alias mpva='mpv --no-video' alias mpva='mpv --no-video'
alias gpgsim='gpg -c --no-symkey-cache --cipher-algo AES256 --digest-algo SHA512' alias gpgsim='gpg -c --no-symkey-cache --cipher-algo AES256 --digest-algo SHA512'
alias updm='sudo reflector --ipv4 --latest 40 --sort rate --save /etc/pacman.d/mirrorlist' alias updm='sudo reflector --ipv4 --latest 40 --sort rate --save /etc/pacman.d/mirrorlist'
alias clpkc='paccache -rk1 && paccache -ruk0 && pacman -Qtdq | sudo pacman -Rns -' alias clpkc='paccache -rk0 && paccache -ruk0 && pacman -Qtdq | sudo pacman -Rns -'
alias noscreenblanking='xset s off -dpms' alias noscreenblanking='xset s off -dpms'
alias ytlistf='yt-dlp --list-formats' alias ytlistf='yt-dlp --list-formats'
alias gc='gcc -lm -O2 -g -Wall -Wextra' alias gc='gcc -lm -O2 -g -Wall -Wextra'
@ -65,6 +75,9 @@ alias updchroot='arch-nspawn $CHROOT/root pacman -Syu'
alias chrooted='CHROOT=$HOME/chroot' alias chrooted='CHROOT=$HOME/chroot'
alias axelf='axel -4kN' alias axelf='axel -4kN'
# git
alias gits='git status'
# just in case # just in case
alias cp='cp -i' alias cp='cp -i'
alias mv='mv -i' alias mv='mv -i'
@ -78,11 +91,15 @@ alias tarlzu='tarlz --anonymous -9vcf'
# archive # archive
alias 7zu='7z a -t7z -m0=lzma2 -mfb=273 -md=1536m -mx=9 -ms=on' alias 7zu='7z a -t7z -m0=lzma2 -mfb=273 -md=1536m -mx=9 -ms=on'
# source list
#alias meson-list-src='tree -L 100000 -ifF --noreport $1 | rg -v /$ | sed s/$/,/g'
# export # export
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp' export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp'
PATH="$HOME/bin/:$PATH" #export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
#export PATH="$PATH:$GEM_HOME/bin:$HOME/bin"
export LESSHISTFILE="$XDG_CACHE_HOME/less/history" export LESSHISTFILE="$XDG_CACHE_HOME/less/history"
# Plugins # Plugins
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh