]> arthur.barton.de Git - ax-zsh.git/blob - plugins/remind/remind.zshrc
icalbuddy, remind: Don't run for "axzshctl check-plugins"
[ax-zsh.git] / plugins / remind / remind.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # remind.zshrc: Show reminders of remind(1).
3
4 # Make sure that "remind(1)" is installed.
5 (( $+commands[remind] )) || return 1
6
7 # Don't run this plugin on "check-plugins"!
8 [[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 0
9
10 # Some handy alias.
11 alias remindcal='remind -ccu+3 -m -w$COLUMNS,4,0 $HOME/.remind'
12
13 # Check if reminders have been shown during last 60 minutes, and if so,
14 # don't show them now but return.
15 [[ -z `find ~/.last_reminder -mmin -60 2>/dev/null` ]] || return 0
16
17 # Show reminders now.
18 remind -h -g -t5 ~/.remind && echo
19
20 # Wtite "stamp" file.
21 [[ -w ~/ ]] && touch ~/.last_reminder