simplify some things and remove some unused code
This commit is contained in:
parent
931efc7518
commit
6cf86a3827
144 changed files with 251 additions and 3912 deletions
|
@ -1,6 +1,4 @@
|
|||
{config, ...}: {
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
|
@ -11,6 +9,8 @@
|
|||
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
extended = true;
|
||||
save = 100 * 1000;
|
||||
path = "${config.xdg.dataHome}/zsh_history";
|
||||
};
|
||||
initExtra = ''
|
||||
|
@ -41,13 +41,31 @@
|
|||
|
||||
|
||||
## PROMPT ##
|
||||
function preexec() {
|
||||
timer=$(date +%s%3N)
|
||||
}
|
||||
|
||||
function precmd_timer() {
|
||||
if [ $timer ]; then
|
||||
now=$(date +%s%3N)
|
||||
elapsed=$(($now-$timer))
|
||||
|
||||
if [[ elapsed -gt 100 ]]; then
|
||||
export RPROMPT="%F{cyan}''${elapsed}ms %f"
|
||||
else
|
||||
unset RPROMPT
|
||||
fi
|
||||
unset timer
|
||||
fi
|
||||
}
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
precmd_functions+=( precmd_vcs_info precmd_timer )
|
||||
zstyle ':vcs_info:git:*' formats ' %b '
|
||||
setopt prompt_subst
|
||||
|
||||
PROMPT="%F{blue}[%F{magenta}%n%F{blue}@%F{magenta}%M%F{blue}] %~%f %F{green}\$vcs_info_msg_0_%f%(?..%F{red}| %? )%#%f "
|
||||
PROMPT='%F{blue}[%F{magenta}%n%F{blue}@%F{magenta}%M%F{blue}] %~%f %F{green}$vcs_info_msg_0_%f%(?..%F{red}| %? )%#%f '
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue