From e8161ddaf8ea0c346262794ad193500e712a02ed Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 22 Jun 2022 14:30:06 +0200 Subject: [PATCH] new aliases and move bin folder --- .nanorc | 2 +- .zshrc | 6 +++++- du.grc | 39 +++++++++++++++++++++++++++++++++++++++ readme.md | 5 +++-- 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 du.grc diff --git a/.nanorc b/.nanorc index 0d134dd..3e184a7 100644 --- a/.nanorc +++ b/.nanorc @@ -19,4 +19,4 @@ set titlecolor #0cc bind ^Z suspend main include "~/.config/nano/syntax/*.nanorc" -include "~/.config/nano/syntax/extra/*.nanorc" +#include "~/.config/nano/syntax/extra/*.nanorc" diff --git a/.zshrc b/.zshrc index 835a63b..6a35f37 100644 --- a/.zshrc +++ b/.zshrc @@ -1,13 +1,17 @@ -export PATH=$HOME/.bin:$PATH +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" alias ..='cd ..' alias ...='cd ../..' +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' +alias getkey='apt-key adv --keyserver keyserver.ubuntu.com --recv-keys' alias l="k -h --no-vcs --group-directories-first" alias la="k -h -A --no-vcs --group-directories-first" if (( $+commands[exa] )); then diff --git a/du.grc b/du.grc new file mode 100644 index 0000000..c0f84ba --- /dev/null +++ b/du.grc @@ -0,0 +1,39 @@ +# 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/readme.md b/readme.md index a25ccdc..320fba3 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,10 @@ ### Install [exa](https://git.sdf.org/michael/zsh/wiki/exa) and [nano](https://git.sdf.org/michael/zsh/wiki/nano) ``` +mkdir -p ~/.config/{bin,grc,zsh} git clone --recurse https://git.sdf.org/michael/zsh ~/.config/zsh cp ~/.config/zsh/.zshenv.example ~/.zshenv -mkdir -p ~/.config/grc && cd ~/.config/grc && ln -s ../zsh/grc/{grc.conf,colourfiles/*} . -ln -s ../.config/zsh/grc/grc{,at} ~/.bin +ln -s ../zsh/grc/grc{,at} ~/.config/bin +cd ~/.config/grc && ln -s ../zsh/grc/{grc.conf,colourfiles/*} . chsh -s $(which zsh) ``` ![Screenshot](https://michael.sdf.org/zsh.png) \ No newline at end of file