diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-25 23:26:58 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-25 23:26:58 +1200 |
commit | 84871deb0ac09dd34872a8af31385c6997a387f6 (patch) | |
tree | 3845c5ea2e8a9c65178a9deeca3467dc49bf0778 /sh/profile.d/fortune.sh | |
parent | Remove default PS1 for sh (diff) | |
download | dotfiles-84871deb0ac09dd34872a8af31385c6997a387f6.tar.gz dotfiles-84871deb0ac09dd34872a8af31385c6997a387f6.zip |
Combine welcome messages into one script
Diffstat (limited to 'sh/profile.d/fortune.sh')
-rw-r--r-- | sh/profile.d/fortune.sh | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sh/profile.d/fortune.sh b/sh/profile.d/fortune.sh deleted file mode 100644 index d7f1d202..00000000 --- a/sh/profile.d/fortune.sh +++ /dev/null @@ -1,23 +0,0 @@ -# Only if shell is interactive -case $- in - *i*) ;; - *) return ;; -esac - -# Only if not in a tmux window -[ -z "$TMUX" ] || return - -# Only if ~/.welcome/fortune exists and ~/.hushlogin doesn't -[ -e "$HOME"/.welcome/fortune ] || return -! [ -e "$HOME"/.hushlogin ] || return - -# Only if fortune(6) available -command -v fortune >/dev/null 2>&1 || return - -# Print from subshell to keep namespace clean -( - [ -d "$HOME"/.local/share/games/fortunes ] && - : "${FORTUNE_PATH:="$HOME"/.local/share/games/fortunes}" - fortune -s "$FORTUNE_PATH" - printf '\n' -) |