;;; these macros check for MIT mail. /set hasmail 0 /def mailcheck = \ /if (regmatch('!You don\'t have any mail waiting.', $(/sys from -t))) \ /set hasmail 0 %; \ /test status_fields := status_fields %; \ /elseif (!hasmail) \ /echo -p @{huCred}%% You have new mail.@{n} %; \ /beep 1 %; \ /set hasmail 1 %; \ /test status_fields := status_fields %; \ /endif /def mailwatch = /set status_int_mail hasmail ? "(Mail)" : "" %; /mailwatcher /def mailwatcher = /mailcheck %; /repeat -0:05 1 /mailwatcher /echo % Executing /mailwatch... /mailwatch ;;; Rebinds CTL-L to also call /mailcheck if we're watching for MIT mail /unbind ^L /bind ^L = /dokey redraw %; /if (hasmail) /mailcheck %; /endif