]> git.armaanb.net Git - admone.git/blobdiff - admone.zsh
Update license year and email
[admone.git] / admone.zsh
index 700bfa277fdd03d71d0fa8779fba561b4ade54d1..6c1dd1957af8e1ca39f2a571401de1c30ddf957b 100644 (file)
@@ -1,7 +1,6 @@
 # Admone Zsh prompt
-# Copyright Armaan Bhojwani 2020 <code@armaanb.net>
+# Copyright Armaan Bhojwani 2021 <me@armaanb.net>
 # MIT licensed, see the LICENSE file for more information.
-# Git repo at <https://codeberg.org/armaan/admone>
 
 #######################################################################
 # USER CONFIGURATIONS
@@ -28,7 +27,7 @@ SHOW_0_EXIT_CODE="0"
 INCLUDE="admone-pwd;admone-vcs;admone-exit-code"
 FORMAT_LOWER="%B%F{%(?.cyan.red)}"
 
-TRANSIENT_PROMPT="1" # This is buggy
+TRANSIENT_PROMPT="0" # This is buggy
 SHORT_PROMPT="➤"
 FORMAT_SHORT="%B%F{%(?.cyan.red)}"
 
@@ -46,7 +45,6 @@ admone-pwd() {
 }
 admone-vcs() {
   echo "%F{green}${vcs_info_msg_0_}%f"
-  VCS="1"
 }
 admone-exit-code() {
   ([[ $SHOW_0_EXIT_CODE == "1" ]] && echo "%(?,%F{cyan}%?%f,%F{red}%?%f)") ||
@@ -61,10 +59,6 @@ admone-12hr() {
 admone-24hr() {
   echo $(date +%T)
 }
-# Intergration with https://codeberg.org/armaan/zsh-command-time
-admone-time() {
-  echo "%F{cyan}$timer_show%f"
-}
 
 #######################################################################
 # BACKEND
@@ -111,7 +105,7 @@ set-prompt() {
 
 # Set everything!
 if [[ $TRANSIENT_PROMPT == "1" ]]; then
-  SHORT_PROMPT=$FORMAT_SHORT$SHORT_PROMPT%f' '
+  SHORT_PROMPT=$FORMAT_SHORT$SHORT_PROMPT' '%f%b
 
   set-transient-prompt() {
     if [[ $PROMPT != $SHORT_PROMPT ]]; then
@@ -127,7 +121,7 @@ if [[ $TRANSIENT_PROMPT == "1" ]]; then
   trap 'set-transient-prompt; return 130' INT
 fi
 
-if [[ $VCS = "1" ]]; then
+if [[ ! $(echo $INCLUDE | grep -q "vcs") ]]; then
   zstyle ':vcs_info:*' check-for-changes true
   autoload -Uz add-zsh-hook vcs-info
   add-zsh-hook precmd vcs_info