aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/fortune.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/profile.d/fortune.sh')
-rw-r--r--sh/profile.d/fortune.sh23
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'
-)