From 96d1c576a617bba9e0896eab123bdb77a77ee848 Mon Sep 17 00:00:00 2001 From: Nikolas Weger Date: Tue, 8 Dec 2020 15:31:16 +0100 Subject: [PATCH] stuff --- .gitignore | 1 - zsh/files/aliases.zsh | 6 +----- zsh/files/dircolor.zsh | 2 +- zsh/files/direnv.zsh | 16 +--------------- zsh/files/history.zsh | 11 ----------- zsh/rc.zsh | 38 +++++++++++++++++--------------------- 6 files changed, 20 insertions(+), 54 deletions(-) delete mode 100644 zsh/files/history.zsh diff --git a/.gitignore b/.gitignore index 789a38a..7cd2cf6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ zsh/local -zsh/plugins diff --git a/zsh/files/aliases.zsh b/zsh/files/aliases.zsh index 88f0104..20fee9e 100644 --- a/zsh/files/aliases.zsh +++ b/zsh/files/aliases.zsh @@ -17,12 +17,8 @@ alias termbin="nc termbin.com 9999" dotupdate () { pushd ~/.config/dotfiles &>/dev/null - echo -n "Updating Dotfiles... " - git pull &>/dev/null - echo "done" + echo -n "Updating Dotfiles... "; git pull &>/dev/null; echo "done" popd &>/dev/null } themeupdate () { curl -fsSL https://starship.rs/install.sh | bash -s -- --force } - -sheldonup () { curl --proto '=https' -fLsS https://rossmacarthur.github.io/install/crate.sh | sudo bash -s -- --force --repo rossmacarthur/sheldon --to /usr/local/bin } diff --git a/zsh/files/dircolor.zsh b/zsh/files/dircolor.zsh index 213373c..75c6cd6 100644 --- a/zsh/files/dircolor.zsh +++ b/zsh/files/dircolor.zsh @@ -1 +1 @@ -export LS_COLORS='no=00;38;2;171;178;191:fi=00:rs=00;38;2;171;178;191:di=00;38;2;97;175;239:ln=00;38;2;86;182;194:mh=00:pi=07;38;2;171;178;191:so=07;38;2;171;178;191:do=07;38;2;171;178;191:bd=07;38;2;171;178;191:cd=07;38;2;171;178;191:or=00;38;2;190;80;70:su=01;38;2;171;178;191:sg=04;01;38;2;171;178;191:ca=07;38;2;171;178;191:tw=04;01;38;2;97;175;239:ow=01;38;2;97;175;239:st=04;38;2;97;175;239:ex=00;38;2;152;195;121:*.jl=00;38;2;198;120;221:*.c=00;38;2;198;120;221:*.cpp=00;38;2;198;120;221:*.cc=00;38;2;198;120;221:*.h=00;38;2;198;120;221:*.asm=00;38;2;198;120;221:*.py=00;38;2;198;120;221:*.js=00;38;2;198;120;221:*.java=00;38;2;198;120;221:*.sh=00;38;2;198;120;221:*.perl=00;38;2;198;120;221:*.pl=00;38;2;198;120;221:*.go=00;38;2;198;120;221:*.scala=00;38;2;198;120;221:*.m=00;38;2;198;120;221:*.cs=00;38;2;198;120;221:*.r=00;38;2;198;120;221:*.csv=00;38;2;92;99;112:*.txt=00;38;2;92;99;112:*.md=00;38;2;92;99;112:*.toml=00;38;2;92;99;112:*.yml=00;38;2;92;99;112:*.yaml=00;38;2;92;99;112:*.xml=00;38;2;92;99;112:*.json=00;38;2;92;99;112:*.conf=00;38;2;92;99;112:*.tar=00;38;2;224;108;117:*.tgz=00;38;2;224;108;117:*.arj=00;38;2;224;108;117:*.taz=00;38;2;224;108;117:*.lzh=00;38;2;224;108;117:*.lzma=00;38;2;224;108;117:*.tlz=00;38;2;224;108;117:*.txz=00;38;2;224;108;117:*.zip=00;38;2;224;108;117:*.z=00;38;2;224;108;117:*.Z=00;38;2;224;108;117:*.dz=00;38;2;224;108;117:*.gz=00;38;2;224;108;117:*.lz=00;38;2;224;108;117:*.xz=00;38;2;224;108;117:*.bz2=00;38;2;224;108;117:*.bz=00;38;2;224;108;117:*.tbz=00;38;2;224;108;117:*.tbz2=00;38;2;224;108;117:*.tz=00;38;2;224;108;117:*.deb=00;38;2;224;108;117:*.rpm=00;38;2;224;108;117:*.jar=00;38;2;224;108;117:*.rar=00;38;2;224;108;117:*.ace=00;38;2;224;108;117:*.zoo=00;38;2;224;108;117:*.cpio=00;38;2;224;108;117:*.7z=00;38;2;224;108;117:*.rz=00;38;2;224;108;117:*.apk=00;38;2;224;108;117:*.gem=00;38;2;224;108;117:*.jpg=00;38;2;229;192;123:*.JPG=00;38;2;229;192;123:*.jpeg=00;38;2;229;192;123:*.gif=00;38;2;229;192;123:*.bmp=00;38;2;229;192;123:*.pbm=00;38;2;229;192;123:*.pgm=00;38;2;229;192;123:*.ppm=00;38;2;229;192;123:*.tga=00;38;2;229;192;123:*.xbm=00;38;2;229;192;123:*.xpm=00;38;2;229;192;123:*.tif=00;38;2;229;192;123:*.tiff=00;38;2;229;192;123:*.png=00;38;2;229;192;123:*.PNG=00;38;2;229;192;123:*.svg=00;38;2;229;192;123:*.svgz=00;38;2;229;192;123:*.mng=00;38;2;229;192;123:*.pcx=00;38;2;229;192;123:*.dl=00;38;2;229;192;123:*.xcf=00;38;2;229;192;123:*.xwd=00;38;2;229;192;123:*.yuv=00;38;2;229;192;123:*.cgm=00;38;2;229;192;123:*.emf=00;38;2;229;192;123:*.eps=00;38;2;229;192;123:*.CR2=00;38;2;229;192;123:*.ico=00;38;2;229;192;123:*.mov=00;38;2;229;192;123:*.MOV=00;38;2;229;192;123:*.mpg=00;38;2;229;192;123:*.mpeg=00;38;2;229;192;123:*.m2v=00;38;2;229;192;123:*.mkv=00;38;2;229;192;123:*.ogm=00;38;2;229;192;123:*.mp4=00;38;2;229;192;123:*.m4v=00;38;2;229;192;123:*.mp4v=00;38;2;229;192;123:*.vob=00;38;2;229;192;123:*.qt=00;38;2;229;192;123:*.nuv=00;38;2;229;192;123:*.wmv=00;38;2;229;192;123:*.asf=00;38;2;229;192;123:*.rm=00;38;2;229;192;123:*.rmvb=00;38;2;229;192;123:*.flc=00;38;2;229;192;123:*.avi=00;38;2;229;192;123:*.fli=00;38;2;229;192;123:*.flv=00;38;2;229;192;123:*.gl=00;38;2;229;192;123:*.m2ts=00;38;2;229;192;123:*.divx=00;38;2;229;192;123:*.webm=00;38;2;229;192;123:'; +export LS_COLORS='no=00;38;5;15:rs=0:di=00;38;5;6:ln=00;38;5;2:mh=00:pi=48;5;0;38;5;3;01:so=48;5;0;38;5;3;01:do=48;5;0;38;5;3;01:bd=48;5;0;38;5;15;01:cd=48;5;0;38;5;15;01:or=48;5;0;38;5;1:su=48;5;1;38;5;3:sg=48;5;1;38;5;3:ca=30;41:tw=48;5;2;38;5;3:ow=48;5;0;38;5;6:st=48;5;6;38;5;3:ex=00;38;5;2:*.tar=00;38;5;4:*.tgz=00;38;5;4:*.arj=00;38;5;4:*.taz=00;38;5;4:*.lzh=00;38;5;4:*.lzma=00;38;5;4:*.tlz=00;38;5;4:*.txz=00;38;5;4:*.zip=00;38;5;4:*.z=00;38;5;4:*.Z=00;38;5;4:*.dz=00;38;5;4:*.gz=00;38;5;4:*.lz=00;38;5;4:*.xz=00;38;5;4:*.bz2=00;38;5;4:*.bz=00;38;5;4:*.tbz=00;38;5;4:*.tbz2=00;38;5;4:*.tz=00;38;5;4:*.deb=00;38;5;4:*.rpm=00;38;5;4:*.jar=00;38;5;4:*.rar=00;38;5;4:*.ace=00;38;5;4:*.zoo=00;38;5;4:*.cpio=00;38;5;4:*.7z=00;38;5;4:*.rz=00;38;5;4:*.apk=00;38;5;4:*.gem=00;38;5;4:*.jpg=00;38;5;3:*.JPG=00;38;5;3:*.jpeg=00;38;5;3:*.gif=00;38;5;3:*.bmp=00;38;5;3:*.pbm=00;38;5;3:*.pgm=00;38;5;3:*.ppm=00;38;5;3:*.tga=00;38;5;3:*.xbm=00;38;5;3:*.xpm=00;38;5;3:*.tif=00;38;5;3:*.tiff=00;38;5;3:*.png=00;38;5;3:*.PNG=00;38;5;3:*.svg=00;38;5;3:*.svgz=00;38;5;3:*.mng=00;38;5;3:*.pcx=00;38;5;3:*.dl=00;38;5;3:*.xcf=00;38;5;3:*.xwd=00;38;5;3:*.yuv=00;38;5;3:*.cgm=00;38;5;3:*.emf=00;38;5;3:*.eps=00;38;5;3:*.CR2=00;38;5;3:*.ico=00;38;5;3:*.tex=00;38;5;7:*.rdf=00;38;5;7:*.owl=00;38;5;7:*.n3=00;38;5;7:*.ttl=00;38;5;7:*.nt=00;38;5;7:*.torrent=00;38;5;7:*.xml=00;38;5;7:*Makefile=00;38;5;7:*Rakefile=00;38;5;7:*Dockerfile=00;38;5;7:*build.xml=00;38;5;7:*rc=00;38;5;7:*1=00;38;5;7:*.nfo=00;38;5;7:*README=00;38;5;7:*README.txt=00;38;5;7:*readme.txt=00;38;5;7:*.md=00;38;5;7:*README.markdown=00;38;5;7:*.ini=00;38;5;7:*.yml=00;38;5;7:*.cfg=00;38;5;7:*.conf=00;38;5;7:*.h=00;38;5;7:*.hpp=00;38;5;7:*.c=00;38;5;7:*.cpp=00;38;5;7:*.cxx=00;38;5;7:*.cc=00;38;5;7:*.objc=00;38;5;7:*.sqlite=00;38;5;7:*.go=00;38;5;7:*.sql=00;38;5;7:*.csv=00;38;5;7:*.log=00;38;5;8:*.bak=00;38;5;8:*.aux=00;38;5;8:*.lof=00;38;5;8:*.lol=00;38;5;8:*.lot=00;38;5;8:*.out=00;38;5;8:*.toc=00;38;5;8:*.bbl=00;38;5;8:*.blg=00;38;5;8:*~=00;38;5;8:*#=00;38;5;8:*.part=00;38;5;8:*.incomplete=00;38;5;8:*.swp=00;38;5;8:*.tmp=00;38;5;8:*.temp=00;38;5;8:*.o=00;38;5;8:*.pyc=00;38;5;8:*.class=00;38;5;8:*.cache=00;38;5;8:*.aac=00;38;5;1:*.au=00;38;5;1:*.flac=00;38;5;1:*.mid=00;38;5;1:*.midi=00;38;5;1:*.mka=00;38;5;1:*.mp3=00;38;5;1:*.mpc=00;38;5;1:*.ogg=00;38;5;1:*.opus=00;38;5;1:*.ra=00;38;5;1:*.wav=00;38;5;1:*.m4a=00;38;5;1:*.axa=00;38;5;1:*.oga=00;38;5;1:*.spx=00;38;5;1:*.xspf=00;38;5;1:*.mov=00;38;5;1:*.MOV=00;38;5;1:*.mpg=00;38;5;1:*.mpeg=00;38;5;1:*.m2v=00;38;5;1:*.mkv=00;38;5;1:*.ogm=00;38;5;1:*.mp4=00;38;5;1:*.m4v=00;38;5;1:*.mp4v=00;38;5;1:*.vob=00;38;5;1:*.qt=00;38;5;1:*.nuv=00;38;5;1:*.wmv=00;38;5;1:*.asf=00;38;5;1:*.rm=00;38;5;1:*.rmvb=00;38;5;1:*.flc=00;38;5;1:*.avi=00;38;5;1:*.fli=00;38;5;1:*.flv=00;38;5;1:*.gl=00;38;5;1:*.m2ts=00;38;5;1:*.divx=00;38;5;1:*.webm=00;38;5;1:*.axv=00;38;5;1:*.anx=00;38;5;1:*.ogv=00;38;5;1:*.ogx=00;38;5;1:'; diff --git a/zsh/files/direnv.zsh b/zsh/files/direnv.zsh index c3bb3f7..dd6f7ba 100644 --- a/zsh/files/direnv.zsh +++ b/zsh/files/direnv.zsh @@ -1,28 +1,14 @@ #!/usr/bin/env zsh -##################### -# COMMONS -##################### autoload colors is-at-least -######################### -# CONSTANT -######################### BOLD="bold" NONE="NONE" -######################### -# PLUGIN MAIN -######################### - [[ -z "$DIRENV_HOME" ]] && export DIRENV_HOME="$HOME/.config/direnv" ZSH_DIRENV_VERSION_FILE=${DIRENV_HOME}/version.txt -######################### -# Functions -######################### - _zsh_direnv_log() { local font=$1 local color=$2 @@ -37,7 +23,7 @@ _zsh_direnv_log() { } _zsh_direnv_last_version() { - echo $(curl -s https://api.github.com/repos/direnv/direnv/releases | grep tag_name | head -n 1 | cut -d '"' -f 4) + echo $(curl -s https://api.github.com/repos/direnv/direnv/releases | grep tag_name | head -n 1 | cut -d '"' -f4) } _zsh_direnv_download_install() { diff --git a/zsh/files/history.zsh b/zsh/files/history.zsh deleted file mode 100644 index 501551b..0000000 --- a/zsh/files/history.zsh +++ /dev/null @@ -1,11 +0,0 @@ -HISTSIZE=50000 -SAVEHIST=20000 -HISTFILE=$HOME/.cache/zsh/history - -setopt extended_history -setopt hist_expire_dups_first -setopt hist_ignore_dups -setopt hist_ignore_space -setopt hist_verify -setopt inc_append_history -setopt share_history diff --git a/zsh/rc.zsh b/zsh/rc.zsh index cc62887..51cf9c8 100644 --- a/zsh/rc.zsh +++ b/zsh/rc.zsh @@ -1,8 +1,7 @@ export path=($path $HOME/.config/dotfiles/bin) export fpath=($fpath $ZDOTDIR/local/fpath) -export FZF_MARKS_FILE="$HOME/.config/fzfmarks" -export STARSHIP_CONFIG="$ZDOTDIR/starship.toml" -export ZSH_CACHE_PATH="$HOME/.cache/zsh/compcache/" +export FZF_MARKS_FILE=$HOME/.config/fzfmarks +export STARSHIP_CONFIG=$ZDOTDIR/starship.toml # Stuff setopt auto_cd @@ -12,21 +11,15 @@ setopt auto_pushd setopt pushd_ignore_dups setopt pushdminus -mkdir -p $HOME/.cache/zsh - # Zinit Clone if not exist -if [[ ! -f $HOME/.config/zinit/bin/zinit.zsh ]]; then - command git clone https://github.com/zdharma/zinit $HOME/.config/zinit/bin -fi +[[ ! -f $HOME/.config/zinit/bin/zinit.zsh ]] && command git clone https://github.com/zdharma/zinit $HOME/.config/zinit/bin # Zinit declare -A ZINIT ZINIT[BIN_DIR]="$HOME/.config/zinit/bin" ZINIT[HOME_DIR]="$HOME/.config/zinit" ZINIT[ZCOMPDUMP_PATH]="$HOME/.cache/zsh/compdump" - source $HOME/.config/zinit/bin/zinit.zsh -autoload -U +X bashcompinit # Theme eval "$(starship init zsh)" @@ -41,11 +34,16 @@ zinit ice as"program" from"gh-r" mv"pet* -> pet" pick"usr/local/bin/pet"; zinit zinit ice wait lucid blockf atpull'zinit creinstall -q .'; zinit light zsh-users/zsh-completions zinit ice wait lucid atload"_zsh_autosuggest_start"; zinit light zsh-users/zsh-autosuggestions -# Needed +# History Stuff +SAVEHIST=20000 +HISTFILE=$HOME/.cache/zsh/history +setopt inc_append_history + +# Library Files source $ZDOTDIR/files/dircolor.zsh source $ZDOTDIR/files/aliases.zsh -source $ZDOTDIR/files/history.zsh source $ZDOTDIR/files/direnv.zsh +zinit snippet OMZL::history.zsh zinit snippet OMZL::functions.zsh zinit snippet OMZL::completion.zsh zinit snippet OMZL::directories.zsh @@ -53,33 +51,31 @@ zinit snippet OMZL::key-bindings.zsh zinit snippet OMZL::termsupport.zsh zinit snippet OMZL::clipboard.zsh zinit snippet OMZL::grep.zsh -zinit snippet OMZP::sudo -zinit snippet OMZP::command-not-found -zinit snippet OMZP::fzf -zinit snippet OMZP::lando # Completion Stuff zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*:*:*:users' ignored-patterns '*' zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })' -zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' -zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr -zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' -zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost localhost4 localhost6 ip6-localhost broadcasthost pxm zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*localdomain*' '*.eeleater.org' '*sublime*' '*.local' zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' +# Plugins eval "$(fasd --init auto)" +zinit ice wait lucid; zinit snippet OMZP::command-not-found +zinit ice wait lucid; zinit snippet OMZP::lando +zinit ice wait lucid; zinit snippet OMZP::thefuck +zinit ice wait lucid; zinit snippet OMZP::fzf zinit ice wait lucid; zinit light wookayin/fzf-fasd zinit ice wait lucid; zinit light urbainvaes/fzf-marks +zinit ice wait lucid; zinit light Aloxaf/fzf-tab zinit ice wait lucid; zinit light voronkovich/gitignore.plugin.zsh zinit ice wait lucid; zinit light reegnz/jq-zsh-plugin zinit ice wait lucid; zinit light asdf-vm/asdf -zinit ice wait lucid; zinit light Aloxaf/fzf-tab # syntax highlighting zpcompinit +autoload -U +X bashcompinit bashcompinit zinit ice wait lucid atinit"zpcdreplay -q"; zinit light zsh-users/zsh-syntax-highlighting