diff options
Diffstat (limited to 'sh/profile.d/remind.sh')
-rw-r--r-- | sh/profile.d/remind.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sh/profile.d/remind.sh b/sh/profile.d/remind.sh new file mode 100644 index 00000000..3ef0f353 --- /dev/null +++ b/sh/profile.d/remind.sh @@ -0,0 +1,19 @@ +# Only if shell is interactive +case $- in + *i*) ;; + *) return ;; +esac + +# Only if not in a tmux window +[ -z "$TMUX" ] || return + +# Only if ~/.welcome/remind exists and ~/.hushlogin doesn't +[ -e "$HOME"/.welcome/remind ] || return +! [ -e "$HOME"/.hushlogin ] || return + +# Only if rem(1) available +command -v rem >/dev/null 2>&1 || return + +# Print reminders with asterisks +rem -hq | sed 's/^/* /' +printf '\n' |