#!/bin/bash
# Nick Anderson
#### screen.sh ####
# http://www.cmdln.org
# mutt wrapper
# Check for previous mutt session and attach, if not found launch a new one

previousSession=$(screen -list | awk '/\.nice_screen/ {print $1}')
if [ "$previousSession" == "" ]; then
        screen -S nice_screen -c ~/.nice_screen.sh
else
        screen -dr $previousSession
fi



#### .nice_screen.sh ####
# Nick Anderson
# http://www.cmdln.org
# mutt screen setup
# Launch mutt for each account with its own profile specific config

hardstatus alwayslastline
hardstatus string '%{= kG}[email][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%d/%m %{G}%C%A]'
termcapinfo xterm|xterms|xs|rxvt ti@:te@

activity "activity: window ~%"  # Message when activity occurs in a window
vbell_msg "bell: window ~%"     # Message for visual bell
vbellwait 2                     # Seconds to pause the screen for visual bell

screen -t General