summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--10_Environment.zsh18
-rw-r--r--12_Prompts.zsh6
2 files changed, 15 insertions, 9 deletions
diff --git a/10_Environment.zsh b/10_Environment.zsh
index 378dff7..9e5a1f9 100644
--- a/10_Environment.zsh
+++ b/10_Environment.zsh
@@ -21,10 +21,20 @@ export SHELL=`which zsh`
## Agent de clefs SSH/GPG
if [ "$SUDO_USER" = "" ]
then
- KEYCHAIN=~/.keychain/$(hostname)-sh
- cmd_exists keychain && keychain --quiet
- [ -f ${KEYCHAIN} ] && source ${KEYCHAIN}
- [ -f ${KEYCHAIN}-gpg ] && source ${KEYCHAIN}-gpg
+ if cmd_exists keychain
+ then
+ if [ -f ~/.keychain/startup.zsh ]
+ then
+ source ~/.keychain/startup.zsh --quiet
+ else
+ KEYCHAIN=~/.keychain/$(hostname)-sh
+ [ -f ${KEYCHAIN} ] && source ${KEYCHAIN}
+ [ -f ${KEYCHAIN}-gpg ] && source ${KEYCHAIN}-gpg
+ cmd_exists keychain && keychain --quiet --quick --inherit any --stop others
+ [ -f ${KEYCHAIN} ] && source ${KEYCHAIN}
+ [ -f ${KEYCHAIN}-gpg ] && source ${KEYCHAIN}-gpg
+ fi
+ fi
fi
## Colors
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 5b1ea2d..88bdef8 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -153,11 +153,7 @@ update_prompt()
fi
fi
fi
- ## Percentage
- #BATTERY=$(( $(grep "^charge" /proc/pmu/battery_0 | cut -c14- ) * 100 / $(grep "^max_charge" /proc/pmu/battery_0 |cut -c14-) ))
- #BATTERY="-$BATTERY%"
- #BATTERYSIZE=${#BATTERY}
- #BATTERY="$C_$prompt_colors[bar]$_C""$BATTERY%"
+
[ "$DEBUG" = "yes" ] && echo
else
BATTERY=