summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zshrc19
1 files changed, 19 insertions, 0 deletions
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
+ }
# }}}
# }}}