From 360ae5fa01c918b63d324ba6f6eac5334f9d8dd6 Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Wed, 27 Oct 2021 16:05:28 +0200 Subject: [PATCH] Remove useless fancyTerm, dust and repo_char functions Removed functions, some prompts; rewrite prompts not to use fancyTerm --- zsh.d/prompts/prompt_minimal_setup | 12 ------------ zsh.d/prompts/prompt_niceOld_setup | 18 ------------------ zsh.d/prompts/prompt_nice_setup | 20 -------------------- zsh.d/prompts/prompt_plain_setup | 12 ------------ zsh.d/prompts/prompt_server_setup | 12 ------------ zsh.d/prompts/prompt_vscode_setup | 19 ------------------- zsh.d/zshfunctions/dust | 1 - zsh.d/zshfunctions/dust.zwc | Bin 224 -> 0 bytes zsh.d/zshfunctions/fancyTerm | 11 ----------- 9 files changed, 105 deletions(-) delete mode 100644 zsh.d/prompts/prompt_niceOld_setup delete mode 100644 zsh.d/prompts/prompt_nice_setup delete mode 100644 zsh.d/prompts/prompt_vscode_setup delete mode 100644 zsh.d/zshfunctions/dust delete mode 100644 zsh.d/zshfunctions/dust.zwc delete mode 100644 zsh.d/zshfunctions/fancyTerm diff --git a/zsh.d/prompts/prompt_minimal_setup b/zsh.d/prompts/prompt_minimal_setup index ec99b73..6452538 100644 --- a/zsh.d/prompts/prompt_minimal_setup +++ b/zsh.d/prompts/prompt_minimal_setup @@ -1,17 +1,5 @@ function prompt_minimal_setup { -# Setup PROMPT -if `fancyTerm`; then - # We are on xterminal - W="%n@%m:%." - I="%m:%." - L="%B%. %#%b " - PS1="%{]2;$W%}%{]1;$I%}$L" - unset W I L - -else - # We are not on xterminal PS1="%B%. %#%b " -fi } prompt_minimal_setup diff --git a/zsh.d/prompts/prompt_niceOld_setup b/zsh.d/prompts/prompt_niceOld_setup deleted file mode 100644 index 79e6f24..0000000 --- a/zsh.d/prompts/prompt_niceOld_setup +++ /dev/null @@ -1,18 +0,0 @@ -function prompt_niceOld_setup { -if `fancyTerm`; then - W="::: %n at %m in %. :::" - I="%m::%." - L="%B%K{blue}%F{white}@%m::%2~ %f%k -%F{yellow}%#%f%b " - PS1="%{]2;$W%}%{]1;$I%}$L" - unset W I L - -else - # We are not on xterminal - PS1="%B%K{blue}%F{white}[%l] %n@%m:%~ %f%k%F{yellow}%#%f%b " -fi -} - -prompt_niceOld_setup - -# vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh.d/prompts/prompt_nice_setup b/zsh.d/prompts/prompt_nice_setup deleted file mode 100644 index ba34ff1..0000000 --- a/zsh.d/prompts/prompt_nice_setup +++ /dev/null @@ -1,20 +0,0 @@ - -function prompt_nice_setup { -if `fancyTerm`; then - title="::: %n at %m in %. :::" - icon="%m::%." - prompt_='$FX[bold]$FX[italic]$BG[062]@%m::%2~$FX[reset] -$FX[bold]$(repo_char)$FG[220]%#$FX[reset] ' - - PS1="%{]2;$title%}%{]1;$icon%}$prompt_" - unset title icon prompt_ - -else - # We are not on xterminal - PS1='%B%K{blue}%F{white}[%l] $(repo_char)%n@%m:%~ %f%k%F{yellow}%#%f%b ' -fi -} - -prompt_nice_setup - -# vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh.d/prompts/prompt_plain_setup b/zsh.d/prompts/prompt_plain_setup index eca0b3f..024ea97 100644 --- a/zsh.d/prompts/prompt_plain_setup +++ b/zsh.d/prompts/prompt_plain_setup @@ -1,17 +1,5 @@ function prompt_plain_setup { -# Setup PROMPT -if `fancyTerm`; then - # We are on xterminal - W="%n@%m:%." - I="%m:%." - L="%B[%l] %~ %#%b " - PS1="%{]2;$W%}%{]1;$I%}$L" - unset W I L - -else - # We are not on xterminal PS1="%B[%l] %n@%m:%~ %#%b " -fi } prompt_plain_setup diff --git a/zsh.d/prompts/prompt_server_setup b/zsh.d/prompts/prompt_server_setup index 5a66234..a4c3d22 100644 --- a/zsh.d/prompts/prompt_server_setup +++ b/zsh.d/prompts/prompt_server_setup @@ -1,17 +1,5 @@ function prompt_server_setup { -# Setup PROMPT -if `fancyTerm`; then - # We are on xterminal - W="%n@%m:%." - I="%m:%." - L="%T %B@%m %4(~:...:)%3~ %#%b " - PS1="%{]2;$W%}%{]1;$I%}$L" - unset W I L - -else - # We are not on xterminal PS1="%T %B%n@%m:%~ %#%b " -fi } prompt_server_setup diff --git a/zsh.d/prompts/prompt_vscode_setup b/zsh.d/prompts/prompt_vscode_setup deleted file mode 100644 index a80da22..0000000 --- a/zsh.d/prompts/prompt_vscode_setup +++ /dev/null @@ -1,19 +0,0 @@ -function prompt_minimal_setup { -# Setup PROMPT -if `fancyTerm`; then - # We are on xterminal - W="%n@%m:%." - I="%m:%." - L="%B%3(~:...:)%2~ %#%b " - PS1="%{]2;$W%}%{]1;$I%}$L" - unset W I L - -else - # We are not on xterminal - PS1="%B%. %#%b " -fi -} - -prompt_minimal_setup - -# vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh.d/zshfunctions/dust b/zsh.d/zshfunctions/dust deleted file mode 100644 index f06eb31..0000000 --- a/zsh.d/zshfunctions/dust +++ /dev/null @@ -1 +0,0 @@ -hdu -s * diff --git a/zsh.d/zshfunctions/dust.zwc b/zsh.d/zshfunctions/dust.zwc deleted file mode 100644 index c830942d1568beff784c2b9a7784adc71230e0d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmZQ)V`X6|U|=xSGte_)APhu+N)({VKr{!Gol;s{!T^+XWMW`o0@BSu@iZWIQeMrR yHItdangybeg_Vt+i3IzAy0BUawhwG1lOs?G&{l|*%&V217?@{fF)*-LgQNk3{SI{i diff --git a/zsh.d/zshfunctions/fancyTerm b/zsh.d/zshfunctions/fancyTerm deleted file mode 100644 index 4280afa..0000000 --- a/zsh.d/zshfunctions/fancyTerm +++ /dev/null @@ -1,11 +0,0 @@ -fancyterms=('xterm' 'rxvt' 'screen') - -for t in $fancyterms; do -if [ "${TERM#${t}}" != "$TERM" ]; then - unset fancyterms - return 0 -fi -done - -unset fancyterms -return 1