about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hm/soispha/conf/zsh/config/zsh-prompt.zsh64
-rw-r--r--hm/soispha/conf/zsh/default.nix1
2 files changed, 0 insertions, 65 deletions
diff --git a/hm/soispha/conf/zsh/config/zsh-prompt.zsh b/hm/soispha/conf/zsh/config/zsh-prompt.zsh
deleted file mode 100644
index 8f5238b2..00000000
--- a/hm/soispha/conf/zsh/config/zsh-prompt.zsh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env zsh
-_command_time_preexec() {
-    timer=${timer:-$SECONDS}
-}
-
-_command_time_precmd() {
-    PROMPT_TMP_DIR=$(mktemp)
-    if [ $timer ]; then
-        ts=$((SECONDS - timer))
-        tts=$ts
-        mi=0
-        ho=0
-        if [ $ts -ge 3 ]; then
-            while [ $ts -ge 60 ]; do
-                ts=$((ts - 60))
-                mi=$((mi + 1))
-            done
-
-            while [ $mi -ge 60 ]; do
-                mi=$((mi - 60))
-                ho=$((ho + 1))
-            done
-
-            if [ $tts -ge 3600 ]; then
-                out=$(printf '%dh %dm %ds\n' $ho $mi $ts)
-            elif [ $tts -ge 60 ]; then
-                out=$(printf '%dm %ds\n' $mi $ts)
-            elif [ $tts -lt 60 ]; then
-                out=$(printf '%ds\n' $ts)
-            fi
-
-            export psvar[1]="took $(printf '%s ' "$out")"
-            echo $psvar[1] >$PROMPT_TMP_DIR
-        fi
-
-        unset timer
-        unset ts
-        unset tts
-        unset mi
-        unset ho
-    fi
-}
-
-_command_ro_precmd() {
-    if ! [ -w $(pwd) ]; then
-        echo " "
-    fi
-}
-
-preexec_functions+=(_command_time_preexec)
-precmd_functions+=(_command_time_precmd)
-
-blue="14"
-red="9"
-white="15"
-setopt PROMPT_SUBST
-export PROMPT='%(?.%F{$blue}.%F{$red})%B%3~%(!. %F{$red}as root %f. )%F{$white}$(if [ -n $PROMPT_TMP_DIR ];then cat $PROMPT_TMP_DIR 2>/dev/null; rm $PROMPT_TMP_DIR 2>/dev/null;fi)%f%(?.%F{$blue}.%F{$red})%F{$red}$(_command_ro_precmd)%F{$blue}❯ %b%f'
-export RPROMPT=''
-
-#%(2V.%F{$red}%2v%f$(export psvar[2]="") .)
-
-# TODO::
-# Add git support
-#vim:ft=zsh
diff --git a/hm/soispha/conf/zsh/default.nix b/hm/soispha/conf/zsh/default.nix
index 1bfae07b..90eba56c 100644
--- a/hm/soispha/conf/zsh/default.nix
+++ b/hm/soispha/conf/zsh/default.nix
@@ -65,7 +65,6 @@
 
     initExtraFirst =
       builtins.readFile ./config/zsh-init.zsh
-      # + builtins.readFile ./config/zsh-prompt.sh
       + ''
         SHELL_LIBRARY_VERSION="2.1.2" source ${shell_library.rawLib.${system}}
         # This next line buffers the first line of the following item: