diff --git a/.config/lf/lfrc b/.config/lf/lfrc index fefe64a0a..ca86b5c18 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -72,8 +72,8 @@ cmd link &{{ cmd bulkrename $vidir cmd on-cd &{{ - lf -remote "send $id set promptfmt \"$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_PROMPT')\"" - printf "%b" "\033]0;$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_TITLE')\007" > /dev/tty + lf -remote "send $id set promptfmt \"$(${HOME}/.local/libexec/lf_prompt)\"" + printf "%b" "\033]0;$(zsh -c 'print -P %n@%m [%3~] ')\007" > /dev/tty }} cmd on-quit &printf "\033]0; $(echo $PWD | sed "s|$HOME|~|")\007" > /dev/tty diff --git a/.config/zsh/configs/1-functions b/.config/zsh/configs/1-functions index e18586938..f79d296b7 100644 --- a/.config/zsh/configs/1-functions +++ b/.config/zsh/configs/1-functions @@ -19,7 +19,7 @@ function lfwrap() { LF_DIRFILE="$(mktemp -u)" env lfX -last-dir-path="$LF_DIRFILE" \ - -command "set promptfmt \"$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_PROMPT')\"" + -command "set promptfmt \"$(${HOME}/.local/libexec/lf_prompt)\"" dir="$(cat "$LF_DIRFILE")" rm "$LF_DIRFILE" &>/dev/null diff --git a/.config/zsh/configs/2-setup b/.config/zsh/configs/2-setup index 3b68ac33a..921849095 100644 --- a/.config/zsh/configs/2-setup +++ b/.config/zsh/configs/2-setup @@ -1,5 +1,8 @@ #!/bin/zsh +export PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b ' +export RPROMPT='%(?..%F{red}%?) $(venv_prompt)' + [ ! -f $XDG_DATA_HOME/zsh/history ] && mkdir -p $XDG_DATA_HOME/zsh && touch $XDG_DATA_HOME/zsh/history fpath=($XDG_CONFIG_HOME/zsh/completions $fpath) diff --git a/.config/zsh/configs/prompt b/.config/zsh/configs/prompt deleted file mode 100644 index 03cd8da07..000000000 --- a/.config/zsh/configs/prompt +++ /dev/null @@ -1,5 +0,0 @@ -export PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b ' -export RPROMPT='%(?..%F{red}%?) $(venv_prompt)' - -export LF_PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~/%F{yellow}%%f%f%F{magenta}]' -export LF_TITLE='%n@%m [%3~] '