From 927cd594c2d53f82c92a4ffa65c60bd38410cfeb Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 28 Feb 2023 14:34:35 +0200 Subject: [.zshrc] Updated homelander config --- .zshrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 5fcff79..82a160d 100644 --- a/.zshrc +++ b/.zshrc @@ -74,8 +74,27 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an # Homelander {{{ source ~/.zsh/homelander/homelander.zsh + source ~/.zsh/homelander/homelander-sections.zsh + export PROMPT='$(hl_exitpwd)$(hl_cecho_caps $(hl_user)  ) $(hl_cecho $(hl_time)) $(hl_cecho $(hl_precursor)) ' export RPROMPT='' + + HL_TIME_T='%T' + hl_hooks() { + hl_time_async + hl_precursor_async + } + + # Custom section + hl_exitpwd() { + local __bg=$([ -n "$SSH_TTY" ] && echo $HL_USER_SSH || echo $HL_USER_BG) + + line=(' |' ' ' ']\n' '\n' '\b' '\b' 0) + [ "$_exit_code" -ne 0 ] && line+=(o $HL_EXIT_FG ' %? ') + [ "$_print_directory" -ne 0 ] && line+=(o $__bg ' %d ') + + [ ${#line} -gt 7 ] && hl_concatsec $line + } # }}} # }}} -- cgit v1.2.3