use .local folder

This commit is contained in:
michael 2022-07-24 18:43:33 +02:00
parent e8161ddaf8
commit a23ffde74f
15 changed files with 30 additions and 98 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
.DS_Store
.zcompdump

21
.gitmodules vendored
View File

@ -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

22
.nanorc
View File

@ -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"

View File

@ -1,3 +0,0 @@
skip_global_compinit=1
SHELL_SESSIONS_DISABLE=1
ZDOTDIR=$HOME/.config/zsh

39
du.grc
View File

@ -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

1
grc

@ -1 +0,0 @@
Subproject commit f4a579e08d356a3ea00a8c6fda7de84fff5f676a

View File

1
plugins/pure Submodule

@ -0,0 +1 @@
Subproject commit 3b2606db2e7eb6f05c67b229b5e3c68a1c3947a6

@ -0,0 +1 @@
Subproject commit caa749d030d22168445c4cb97befd406d2828db0

1
pure

@ -1 +0,0 @@
Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced

View File

@ -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)

@ -1 +0,0 @@
Subproject commit c5ce0014677a0f69a10b676b6038ad127f40c6b1

5
zshenv Normal file
View File

@ -0,0 +1,5 @@
skip_global_compinit=1
SHELL_SESSIONS_DISABLE=1
ZDOTDIR=$HOME/.config
GRC_ALIASES=true
export PATH=$HOME/.local/bin:$PATH

View File

@ -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)