summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zlogin2
-rw-r--r--01_Functions.zsh7
2 files changed, 4 insertions, 5 deletions
diff --git a/.zlogin b/.zlogin
index 54a7f1b..449706b 100644
--- a/.zlogin
+++ b/.zlogin
@@ -1,6 +1,6 @@
cmd_exists keychain && eval $(keychain --eval --inherit any-once --quick)
-birthdays
+when
true
diff --git a/01_Functions.zsh b/01_Functions.zsh
index b402cb8..d421602 100644
--- a/01_Functions.zsh
+++ b/01_Functions.zsh
@@ -405,14 +405,13 @@ set_prompt_colors ()
guilt_colors[unapplied]=$color[black]
}
-birthdays()
+when()
{
- WHEN_FILE=~/.when/birthdays
TODAY_FILE=~/.when/.today
- if cmd_exists when && [ -e $WHEN_FILE ]
+ if cmd_exists when
then
- when --calendar=$WHEN_FILE $@ | tail -n+3 | \
+ $(which -p when) $@ | tail -n+3 | \
sed 's/^\(aujourd.hui *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'1;33'$_c'\1\2'$c_'0'$_c'/;
s/^\(demain *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'1'$_c'\1\2'$c_'0'$_c'/;
s/^\(hier *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'3'$_c'\1\2'$c_'0'$_c'/' \