From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15240 invoked by alias); 7 Feb 2014 16:27:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18415 Received: (qmail 15932 invoked from network); 7 Feb 2014 16:27:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140207082651.ZM28838@torch.brasslantern.com> Date: Fri, 07 Feb 2014 08:26:51 -0800 In-reply-to: Comments: In reply to Thorsten Kampe "Re: Executing command on reattaching to screen session" (Feb 7, 12:54pm) References: <140206200141.ZM27955@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Executing command on reattaching to screen session MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 7, 12:54pm, Thorsten Kampe wrote: } } > latest_motd() { } > if [[ /etc/motd -nt ~/.last_motd ]] } > then } > cp --preserve=timestamps /etc/motd ~/.last_motd } > cat ~/.last_motd } > fi } > } } > add-zsh-hook precmd latest_motd } } Thanks for the suggestion. The information has to be displayed } regularly even if it hasn't changed. Well, then ... unless you're using the periodic hook for something else: # Show message of the day at least once per hour PERIOD=3600 show_motd() { cat /etc/motd } add-zsh-hook periodic show_motd but I imagine having it as a "screensaver" is still preferable to having whatever else you were doing scroll away every hour.