summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-01-30 10:55:54 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-01-30 10:55:54 +0100
commit0dfcb165d38197e60126cf9e720ec254fc26ad24 (patch)
tree1413bbf406f38e85fa5222be3e64337666017f0e
parentbd608f7f0273b19105feecc7b37a5bb24b74fe9e (diff)
parentf2d5d2805b68a99b9df6670e3585927ea9320257 (diff)
Merge commit 'origin/master'
-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=