From b91142f643e27d43556794c28e17b768fce7d1d5 Mon Sep 17 00:00:00 2001 From: materus Date: Sat, 30 Mar 2024 20:58:11 +0100 Subject: [PATCH] home-profile: zsh style changes 2 --- extraFiles/config/zsh/p10kcfg/compatibility.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extraFiles/config/zsh/p10kcfg/compatibility.zsh b/extraFiles/config/zsh/p10kcfg/compatibility.zsh index bd221a6..1f01822 100644 --- a/extraFiles/config/zsh/p10kcfg/compatibility.zsh +++ b/extraFiles/config/zsh/p10kcfg/compatibility.zsh @@ -97,6 +97,7 @@ timewarrior # timewarrior tracking status (https://timewarrior.net/) taskwarrior # taskwarrior task count (https://taskwarrior.org/) # cpu_arch # CPU architecture + private time # current time # ip # ip address and bandwidth usage for a specified network interface # public_ip # public IP address @@ -1575,7 +1576,11 @@ function prompt_example() { p10k segment -f 2 -i '*' -t 'hello, %n' } - + function prompt_private() { + if [ $__MATERUS_HM_ZSH_PRIVATE = "1" ]; then + p10k segment -f 5 -t 'PRIVATE' + fi + } # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.