From a23ffde74f8c85db427b067bc1a565c6deb019e8 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 24 Jul 2022 18:43:33 +0200 Subject: [PATCH] use .local folder --- .gitignore | 2 - .gitmodules | 21 +++++----- .nanorc | 22 ----------- .zshenv.example | 3 -- du.grc | 39 ------------------- grc | 1 - k => plugins/k | 0 plugins/pure | 1 + .../zsh-autosuggestions | 0 plugins/zsh-syntax-highlighting | 1 + pure | 1 - readme.md | 12 +++--- zsh-syntax-highlighting | 1 - zshenv | 5 +++ .zshrc => zshrc | 19 +++++---- 15 files changed, 30 insertions(+), 98 deletions(-) delete mode 100644 .gitignore delete mode 100644 .nanorc delete mode 100644 .zshenv.example delete mode 100644 du.grc delete mode 160000 grc rename k => plugins/k (100%) create mode 160000 plugins/pure rename zsh-autosuggestions => plugins/zsh-autosuggestions (100%) create mode 160000 plugins/zsh-syntax-highlighting delete mode 160000 pure delete mode 160000 zsh-syntax-highlighting create mode 100644 zshenv rename .zshrc => zshrc (85%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index af35328..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -.zcompdump \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 6754043..1bc7e48 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,12 @@ -[submodule "grc"] - path = grc - url = https://github.com/garabik/grc -[submodule "pure"] - path = pure +[submodule "plugins/k"] + path = plugins/k + url = https://github.com/supercrabtree/k +[submodule "plugins/pure"] + path = plugins/pure url = https://github.com/sindresorhus/pure -[submodule "zsh-autosuggestions"] - path = zsh-autosuggestions +[submodule "plugins/zsh-autosuggestions"] + path = plugins/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions -[submodule "zsh-syntax-highlighting"] - path = zsh-syntax-highlighting +[submodule "plugins/zsh-syntax-highlighting"] + path = plugins/zsh-syntax-highlighting url = https://github.com/zsh-users/zsh-syntax-highlighting -[submodule "k"] - path = k - url = https://github.com/supercrabtree/k.git diff --git a/.nanorc b/.nanorc deleted file mode 100644 index 3e184a7..0000000 --- a/.nanorc +++ /dev/null @@ -1,22 +0,0 @@ -set indicator -set jumpyscrolling -set linenumbers -set minibar -set nonewlines -set nowrap -set quickblank -set tabsize 4 -set unix -unset historylog - -set functioncolor #088 -set keycolor #0cc -set minicolor #0cc -set numbercolor #066 -set promptcolor #0cc -set scrollercolor #088 -set titlecolor #0cc - -bind ^Z suspend main -include "~/.config/nano/syntax/*.nanorc" -#include "~/.config/nano/syntax/extra/*.nanorc" diff --git a/.zshenv.example b/.zshenv.example deleted file mode 100644 index b088bd4..0000000 --- a/.zshenv.example +++ /dev/null @@ -1,3 +0,0 @@ -skip_global_compinit=1 -SHELL_SESSIONS_DISABLE=1 -ZDOTDIR=$HOME/.config/zsh diff --git a/du.grc b/du.grc deleted file mode 100644 index c0f84ba..0000000 --- a/du.grc +++ /dev/null @@ -1,39 +0,0 @@ -# Cannot read STDERR, not working -regexp=^du.* -colours=red -====== -# Path -regexp=\s+[\.\/]+([\w\s\-\_\.]+)(\/.*)?$ -colours=default,bold blue,blue -====== -# Size 'K' -regexp=^\d{1,3}\s -colours=bright_black -====== -regexp=^ ?\d*[.,]?\dKi?\s -colours=bright_black -====== -# Size 'M' -regexp=^\d{4,6}\s -colours=cyan -====== -regexp=^ ?\d*[.,]?\dMi?\s -colours=cyan -====== -# Size 'G' -regexp=^\d{7,9}\s -colours=yellow -====== -regexp=^ ?\d*[.,]?\dGi?\s -colours=yellow -====== -# Size 'T' -regexp=^\d{10,12}\s -colours=red -====== -regexp=^ ?\d*[.,]?\dTi?\s -colours=red -====== -# Total -regexp=(.*)\s+(total)$ -colours=magenta diff --git a/grc b/grc deleted file mode 160000 index f4a579e..0000000 --- a/grc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f4a579e08d356a3ea00a8c6fda7de84fff5f676a diff --git a/k b/plugins/k similarity index 100% rename from k rename to plugins/k diff --git a/plugins/pure b/plugins/pure new file mode 160000 index 0000000..3b2606d --- /dev/null +++ b/plugins/pure @@ -0,0 +1 @@ +Subproject commit 3b2606db2e7eb6f05c67b229b5e3c68a1c3947a6 diff --git a/zsh-autosuggestions b/plugins/zsh-autosuggestions similarity index 100% rename from zsh-autosuggestions rename to plugins/zsh-autosuggestions diff --git a/plugins/zsh-syntax-highlighting b/plugins/zsh-syntax-highlighting new file mode 160000 index 0000000..caa749d --- /dev/null +++ b/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit caa749d030d22168445c4cb97befd406d2828db0 diff --git a/pure b/pure deleted file mode 160000 index 5b458ba..0000000 --- a/pure +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced diff --git a/readme.md b/readme.md index 320fba3..b11a1bf 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,8 @@ -### Install [exa](https://git.sdf.org/michael/zsh/wiki/exa) and [nano](https://git.sdf.org/michael/zsh/wiki/nano) +### Install [exa](https://the.exa.website) and [nano](https://www.nano-editor.org) ``` -mkdir -p ~/.config/{bin,grc,zsh} -git clone --recurse https://git.sdf.org/michael/zsh ~/.config/zsh -cp ~/.config/zsh/.zshenv.example ~/.zshenv -ln -s ../zsh/grc/grc{,at} ~/.config/bin -cd ~/.config/grc && ln -s ../zsh/grc/{grc.conf,colourfiles/*} . -chsh -s $(which zsh) +git clone --recurse https://git.sdf.org/michael/zsh ~/.local/share/zsh +ln -s ../.local/share/zsh/zshrc ~/.config/.zshrc +cp ~/.local/share/zsh/zshenv ~/.zshenv +usermod --shell $(which zsh) $(whoami) ``` ![Screenshot](https://michael.sdf.org/zsh.png) \ No newline at end of file diff --git a/zsh-syntax-highlighting b/zsh-syntax-highlighting deleted file mode 160000 index c5ce001..0000000 --- a/zsh-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c5ce0014677a0f69a10b676b6038ad127f40c6b1 diff --git a/zshenv b/zshenv new file mode 100644 index 0000000..62dec92 --- /dev/null +++ b/zshenv @@ -0,0 +1,5 @@ +skip_global_compinit=1 +SHELL_SESSIONS_DISABLE=1 +ZDOTDIR=$HOME/.config +GRC_ALIASES=true +export PATH=$HOME/.local/bin:$PATH diff --git a/.zshrc b/zshrc similarity index 85% rename from .zshrc rename to zshrc index 6a35f37..430e0d7 100644 --- a/.zshrc +++ b/zshrc @@ -1,5 +1,5 @@ -export PATH=$HOME/.config/bin:$PATH export EXA_COLORS="uu=38;5;249:un=38;5;241:gu=38;5;245:gn=38;5;241:da=38;5;23:sn=38;5;7:sb=38;5;7:ur=38;5;3;1:uw=38;5;5;1:ux=38;5;1;1:ue=38;5;1;1:gr=38;5;249:gw=38;5;249:gx=38;5;249:tr=38;5;249:tw=38;5;249:tx=38;5;245:fi=38;5;6;1:di=38;5;6:ex=38;5;1:xa=38;5;12:*.png=38;5;4:*.jpg=38;5;4:*.gif=38;5;4" +export SCREENRC=$HOME/.config/screen/screenrc alias ..='cd ..' alias ...='cd ../..' @@ -7,7 +7,6 @@ alias dl='curl -JLORs' alias bell='echo -en "\007\007"' alias dig='dig +short +noshort' alias cdu='cdu.pl -idhx' -alias gdu='grc -c ~/.config/zsh/du.grc du -shc --exclude=proc/\*/{task,fd,fdinfo} *(D)' alias grep='grep --color=auto' alias hg='history 1 | grep -i ' alias nolog='unset HISTFILE' @@ -26,11 +25,12 @@ function mcd { mkdir -p $1 && cd $1 } function pw { LC_ALL=C < /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-64} } function precmd { print -Pn '\e]2;%m (%~)\a\e]1;%m\a'; } -HISTORY_IGNORE='(..|...|/*|./*|[ *|[[ *|7z *|\\\\*|ack *|attr *|bell|bg|borg *|cat *|cd|cd *|chmod *|chown *|cp *|curl *|dialog *|dig *|du|du *|echo *|export *|fg|find *|for |git commit *|*grep *|hexdump *|hg *|kill *|l|l *|la|la *|ln *|ls *|man *|mcd *|md5 *|md5sum *|mkdir *|mount *|mv *|nano *|nolog|nslookup *|openssl *|pidof *|ping *|popd *|pushd *|rm *|rmdir *|rmdir *|rsync *|scp *|screen *|sleep *|sysbench *|tail *|tar *|time *|timeout *|touch *|traceroute *|truncate *|umount *|unp *|watch *|wget *|which *|while *|whois *|zcat *)' +HISTORY_IGNORE='(..|...|/*|./*|[ *|[[ *|7z *|\\\\*|ack *|attr *|bell|bg|borg *|cat *|cd|cd *|chmod *|chown *|cp *|curl *|dialog *|dig *|du|du *|echo *|export *|fg|find *|for |git commit *|*grep *|hexdump *|hg *|kill *|l|l *|la|la *|ln *|ls *|man *|mcd *|md5 *|md5sum *|mkdir *|mount *|mv *|nano *|nolog|nslookup *|openssl *|pidof *|ping *|ping6 *|popd *|pushd *|rm *|rmdir *|rmdir *|rsync *|scp *|screen *|sleep *|sysbench *|tail *|tar *|time *|timeout *|touch *|traceroute *|truncate *|umount *|unp *|watch *|wget *|which *|while *|whois *|zcat *)' HISTSIZE=1000000 SAVEHIST=$HISTSIZE HISTFILE=$HOME/.config/zhistory -FPATH=$FPATH:$ZDOTDIR/pure +PPATH=$HOME/.local/share/zsh/plugins +FPATH=$FPATH:$PPATH/pure setopt histignorealldups histignorespace histreduceblanks setopt autocd nohup listpacked alwaystoend correct interactivecomments no_beep @@ -74,14 +74,13 @@ bindkey '^[[Z' reverse-menu-complete # shift+tab unalias run-help 2>/dev/null autoload -Uz run-help -autoload -Uz compinit && compinit && zmodload -i zsh/complist +autoload -Uz compinit && compinit -D && zmodload -i zsh/complist autoload -Uz promptinit && promptinit && prompt pure -source "$ZDOTDIR/grc/grc.zsh" -source "$ZDOTDIR/k/k.plugin.zsh" -source "$ZDOTDIR/pure/pure.plugin.zsh" -source "$ZDOTDIR/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh" -source "$ZDOTDIR/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh" +source "$PPATH/k/k.plugin.zsh" +source "$PPATH/pure/pure.plugin.zsh" +source "$PPATH/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh" +source "$PPATH/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh" ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=fg=024 ZSH_AUTOSUGGEST_STRATEGY=(history completion)