From 087ad33d2e07cd313f62eb23ad60c7cdc6be8a9a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 22 Jan 2022 21:43:20 -0800 Subject: [PATCH] [zsh] Print date and system info on prompt start --- zprofile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/zprofile b/zprofile index 7cd1b0d..c008eee 100644 --- a/zprofile +++ b/zprofile @@ -1,6 +1,7 @@ #!/usr/bin/env zsh # Eryn Wells + # Start SSH agent for password-less logins if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then if ! pgrep -u $USER ssh-agent 1>/dev/null; then @@ -11,6 +12,16 @@ if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then fi fi -autoload list_tmux_sessions -list_tmux_sessions +autoload -Uz list_tmux_sessions +autoload -Uz binary_exists +if binary_exists sw_vers && binary_exists lolcat; then + case $SYS in + darwin) + print "It's `date +'%H:%M on %A, %B %d'`.\nThis machine is a $HWMODEL.\nYou're running macOS $OSVERSION.\n" | lolcat + ;; + *) ;; + esac +fi + +list_tmux_sessions