;; If there are new messages on the server, change bckg color:
(add-hook 'vm-spooled-mail-waiting-hook
(lambda ()
(set-face-background 'default "rgb:b9/ca/b9")
))
;;After getting mail change the color back:
(add-hook 'vm-arrived-message-hook
(lambda ()
(set-face-background 'default "rgb:c7/c7/bf")
))
How can I do something similar with gnus? I didn't find any
appropriate hooks.
Maybe someone has other useful ideas?
-Serge
This is what I put into my .gnus:
(add-hook 'nnml-prepare-save-mail-hook
(lambda ()
(set-face-background 'default "lightgoldenrod")
))
(add-hook 'message-sent-hook
(lambda ()
(set-face-background 'default "rgb:c7/c7/bf")
))
I need the second hook to keep my default background color which is
rgb:c7/c7/bf. When I have new mail color become lightgoldenrod, so
even if gnus minimized I know that my new mail is waiting for
me.
-Serge
> Now I solved this issue, the solution, perhaps, is not elegant, but it
> works -- so it's not that stupid :-).
>
> This is what I put into my .gnus:
>
> (add-hook 'nnml-prepare-save-mail-hook
> (lambda ()
> (set-face-background 'default "lightgoldenrod")
> ))
> (add-hook 'message-sent-hook
> (lambda ()
> (set-face-background 'default "rgb:c7/c7/bf")
> ))
Cool trick.
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
add-hook 'gnus-select-article-hook
(lambda ()
(set-face-background 'default "rgb:c7/c7/bf")
))
-Serge
> Now I solved this issue, the solution, perhaps, is not elegant, but it
> works -- so it's not that stupid :-).
>
> This is what I put into my .gnus:
>
> (add-hook 'nnml-prepare-save-mail-hook
> (lambda ()
> (set-face-background 'default "lightgoldenrod")
> ))
> (add-hook 'message-sent-hook
> (lambda ()
> (set-face-background 'default "rgb:c7/c7/bf")
> ))
This is wicked cool! Now, how do I modify it so that it only notifies me of
new mail with a color change if mail has been added to certain groups? I
split spam and unimportant stuff to various groups. I don't need to be
interrupted with the color change just to tell me that I have new spam.
Anyone able to help me with this?
Thanks!
Derrell
[...]
> This is wicked cool! Now, how do I modify it so that it only notifies me of
> new mail with a color change if mail has been added to certain groups? I
> split spam and unimportant stuff to various groups. I don't need to be
> interrupted with the color change just to tell me that I have new spam.
> Anyone able to help me with this?
Here is some code-snippet that I use. It plays a should when I get
mail in certain folders. You can easily modify it so that it changes
color instead of playing a sound.
(defvar nk-gnus-beepable-groups "mail/Mailbox"
"A regexp that matches groups for which mail notification should \
take place.")
(defun nk-gnus-notify ()
"Beep if we got mail in an interesting folder."
(let ((you-got-mail nil)
(case-fold-search t))
(dolist (group nnmail-split-history)
(when (string-match nk-gnus-beepable-groups (caar group))
(setq you-got-mail t)))
(when you-got-mail
(progn (call-process "esdplay" nil 0 nil "/usr/share/sounds/phone.wav")
(ding)))))
(add-hook 'gnus-after-getting-new-news-hook 'nk-gnus-notify)
-Nevin
-Serge