* OSD alerts for appointment reminders (+ erc hook to use OSD)
@ 2008-09-25 0:43 Richard Riley
2008-09-25 6:22 ` Paul R
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Richard Riley @ 2008-09-25 0:43 UTC (permalink / raw)
To: org-mode
I thought some of you linux users might like this - use gnome-osd-client
to put an on screen reminder of your looming appointments. I include a
screenshot link below. I'm sure the code can be improved as I'm not much
of an elisp programmer. I have also included an erc hook to use OSD to
display messages in your subscribed irc channels directed at you. Hope
you like it. I dont know if the gnome-osd stuff will work on kde, but
try it and see.
http://www.imagebucket.in/images/layopataa1r203lmuwp3.png
org stuff:
,----
| ; Update appt each time agenda opened.
| (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt)
|
| (setq appt-display-format 'window)
|
| (require 'my-osd)
|
| (defun org-osd-display (min-to-app new-time msg)
| (osd-display msg msg -1 "center" "center" "Verdana 20")
| )
|
| (setq appt-disp-window-function (function org-osd-display))
|
| ;; see my-osd for plugins
|
| (require 'diary-lib)
| (add-hook 'diary-display-hook 'fancy-diary-display)
|
| ;; Run once, activate and schedule refresh
| (run-at-time nil 3600 'org-agenda-to-appt)
| (appt-activate t)
`----
osd stuff:
,----
| (defun osd-display (id msg &optional delay vattrib hattrib font)
|
| "Display a message with an id of ID for delay seconds with message msg"
|
| (unless vattrib (setq vattrib "top"))
| (unless hattrib (setq hattrib "right"))
| (unless delay (setq delay 5000))
| (unless font (setq font "Serif Bold Italic 32"))
|
| (save-window-excursion
| (shell-command
| (format
| "gnome-osd-client -f \"<message id='%s' osd_fake_translucent_bg='off' osd_font='%s' animations='on' hide_timeout='%d' osd_vposition='%s' osd_halignment='%s'>%s</message>\""
| id
| font
| delay
| vattrib
| hattrib
| msg)
| nil nil)
| ))
|
| ;(osd-display "i2" "and OSD..." 500)
| ;(osd-display "id" "Welcome to Emacs" 1000 "top" "center" "Verdana 20")
|
`----
Finally the erc hook stuff:
,----
| (defun erc-notify-osd (matched-type nick msg)
| (when (string= matched-type "current-nick")
| (message msg)
| (string-match ".*:\\(.*\\)$" msg)
| (setq msg (match-string 1 msg))
| (osd-display (concat "erc-msg : " (erc-extract-nick nick)) (concat (erc-extract-nick nick) " : " msg) 10000 "bottom" "center" "Verdana 23")
| ))
|
| (add-hook 'erc-text-matched-hook 'erc-notify-osd)
`----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
2008-09-25 0:43 OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
@ 2008-09-25 6:22 ` Paul R
2008-09-25 13:10 ` OSD alerts for appointment reminders (+ erc hook to useOSD) Chris Randle
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Paul R @ 2008-09-25 6:22 UTC (permalink / raw)
To: Richard Riley; +Cc: org-mode
On Thu, 25 Sep 2008 02:43:56 +0200, Richard Riley <rileyrgdev@googlemail.com> said:
Richard> I dont know if the gnome-osd stuff will work on kde, but try
Richard> it and see.
osd_cat outputs to X OSD, with no desktop dependency at all.
--
Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: OSD alerts for appointment reminders (+ erc hook to useOSD)
2008-09-25 0:43 OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
2008-09-25 6:22 ` Paul R
@ 2008-09-25 13:10 ` Chris Randle
2008-09-26 3:18 ` OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Chris Randle @ 2008-09-25 13:10 UTC (permalink / raw)
To: 'org-mode'
Richard Riley wrote:
> I thought some of you linux users might like this - use
> gnome-osd-client to put an on screen reminder of your looming
> appointments.
In a similar vein, I've coded something for Windows. It's an interactive
function currently called "my-org-update-desktop-from-agenda". It takes
the current week's agenda view and sets it as the desktop's wallpaper.
Not an alert, but it keeps your workload forever in front of you.
It needs a couple of functions defined in .emacs and a windows
executable (90KB) that I've written which updates the desktop wallpaper
from an html file.
The wallpaper will look exactly the same as the agenda view you'd
normally see within org-mode. It's trivial to adjust one of the
functions if you prefer more/fewer days than 7 displayed.
Only tested on the setup quoted in sig. Anyone who'd like a bundled copy
of the required bits, just drop me an email:
chris[at]amlog[dot]co[dot]uk. Off-list might be best.
--
Chris Randle
Windows XP SP3 - GNU Emacs 22.1.1 - Org-mode 6.07b
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
2008-09-25 0:43 OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
2008-09-25 6:22 ` Paul R
2008-09-25 13:10 ` OSD alerts for appointment reminders (+ erc hook to useOSD) Chris Randle
@ 2008-09-26 3:18 ` Richard Riley
2008-09-26 19:10 ` Cezar Halmagean
[not found] ` <87wsgyyb8j.fsf@cezar@mixandgo.com>
4 siblings, 0 replies; 9+ messages in thread
From: Richard Riley @ 2008-09-26 3:18 UTC (permalink / raw)
To: emacs-orgmode
Richard Riley <rileyrgdev@googlemail.com> writes:
> I thought some of you linux users might like this - use gnome-osd-client
> to put an on screen reminder of your looming appointments. I include a
> screenshot link below. I'm sure the code can be improved as I'm not much
> of an elisp programmer. I have also included an erc hook to use OSD to
> display messages in your subscribed irc channels directed at you. Hope
> you like it. I dont know if the gnome-osd stuff will work on kde, but
> try it and see.
>
> http://www.imagebucket.in/images/layopataa1r203lmuwp3.png
>
>
> org stuff:
>
> ,----
> | ; Update appt each time agenda opened.
> | (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt)
> |
> | (setq appt-display-format 'window)
> |
> | (defun org-osd-display (min-to-app new-time msg)
> | (osd-display msg msg -1 "center" "center" "Verdana 20")
> | )
> |
> | (setq appt-disp-window-function (function org-osd-display))
> |
> | ;; see my-osd for plugins
> |
> | (require 'diary-lib)
> | (add-hook 'diary-display-hook 'fancy-diary-display)
> |
> | ;; Run once, activate and schedule refresh
> | (run-at-time nil 3600 'org-agenda-to-appt)
> | (appt-activate t)
> `----
>
> osd stuff:
>
> ,----
> | (defun osd-display (id msg &optional delay vattrib hattrib font)
> |
> | "Display a message with an id of ID for delay seconds with message msg"
> |
> | (unless vattrib (setq vattrib "top"))
> | (unless hattrib (setq hattrib "right"))
> | (unless delay (setq delay 5000))
> | (unless font (setq font "Serif Bold Italic 32"))
> |
> | (save-window-excursion
> | (shell-command
> | (format
> | "gnome-osd-client -f \"<message id='%s' osd_fake_translucent_bg='off' osd_font='%s' animations='on' hide_timeout='%d' osd_vposition='%s' osd_halignment='%s'>%s</message>\""
> | id
> | font
> | delay
> | vattrib
> | hattrib
> | msg)
> | nil nil)
> | ))
> |
> | ;(osd-display "i2" "and OSD..." 500)
> | ;(osd-display "id" "Welcome to Emacs" 1000 "top" "center" "Verdana 20")
> |
> `----
>
> Finally the erc hook stuff:
>
> ,----
> | (defun erc-notify-osd (matched-type nick msg)
> | (when (string= matched-type "current-nick")
> | (message msg)
> | (string-match ".*:\\(.*\\)$" msg)
> | (setq msg (match-string 1 msg))
> | (osd-display (concat "erc-msg : " (erc-extract-nick nick)) (concat (erc-extract-nick nick) " : " msg) 10000 "bottom" "center" "Verdana 23")
> | ))
> |
> | (add-hook 'erc-text-matched-hook 'erc-notify-osd)
> `----
I forgot to mention you need to enable the erc module "match"
e.g my erc-modules is:
(setq erc-modules (quote (autoaway autojoin button completion match
menu move-to-prompt noncommands readonly scrolltobottom services smiley
stamp spelling truncate highlight-nicknames netsplit fill readonly
noncommands irccontrols move-to-prompt)))
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
2008-09-25 0:43 OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
` (2 preceding siblings ...)
2008-09-26 3:18 ` OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
@ 2008-09-26 19:10 ` Cezar Halmagean
[not found] ` <87wsgyyb8j.fsf@cezar@mixandgo.com>
4 siblings, 0 replies; 9+ messages in thread
From: Cezar Halmagean @ 2008-09-26 19:10 UTC (permalink / raw)
To: emacs-orgmode
Very nice idea, I tryied this on Ubuntu 8.04 but it's not working for
me, the example provided in the gnome-osd-client man doesn't work
either:
gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on' osd_vposition='center' animations='off' hide_timeout='1000' osd_halignment='right'>Volume: 96%</message>"
ServerError: <type 'exceptions.KeyError'>: u'osd_vposition'
Evaluating (osd-display "i2" "and OSD..." 500) => 2
Cezar
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
[not found] ` <87wsgyyb8j.fsf@cezar@mixandgo.com>
@ 2008-09-27 15:45 ` Richard Riley
2008-09-29 18:38 ` Cezar Halmagean
[not found] ` <87hc7yol03.fsf@cezar@mixandgo.com>
0 siblings, 2 replies; 9+ messages in thread
From: Richard Riley @ 2008-09-27 15:45 UTC (permalink / raw)
To: Cezar Halmagean; +Cc: emacs-orgmode
Cezar Halmagean <cezar@mixandgo.com> writes:
> Very nice idea, I tryied this on Ubuntu 8.04 but it's not working for
> me, the example provided in the gnome-osd-client man doesn't work
> either:
I pasted that in to my shell on Debian Lenny and it worked. Did you try
another gnome-osd-line without the xml?
My (debian) package is v 0.12.2-1.
>
> gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on' osd_vposition='center' animations='off' hide_timeout='1000' osd_halignment='right'>Volume: 96%</message>"
>
> ServerError: <type 'exceptions.KeyError'>: u'osd_vposition'
>
> Evaluating (osd-display "i2" "and OSD..." 500) => 2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
2008-09-27 15:45 ` Richard Riley
@ 2008-09-29 18:38 ` Cezar Halmagean
[not found] ` <87hc7yol03.fsf@cezar@mixandgo.com>
1 sibling, 0 replies; 9+ messages in thread
From: Cezar Halmagean @ 2008-09-29 18:38 UTC (permalink / raw)
To: emacs-orgmode
Richard Riley <rileyrgdev@googlemail.com> writes:
> I pasted that in to my shell on Debian Lenny and it worked. Did you try
> another gnome-osd-line without the xml?
>
like what ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
[not found] ` <87hc7yol03.fsf@cezar@mixandgo.com>
@ 2008-09-29 18:44 ` Richard Riley
2008-09-29 18:48 ` Cezar Halmagean
0 siblings, 1 reply; 9+ messages in thread
From: Richard Riley @ 2008-09-29 18:44 UTC (permalink / raw)
To: Cezar Halmagean; +Cc: emacs-orgmode
Cezar Halmagean <cezar@mixandgo.com> writes:
> Richard Riley <rileyrgdev@googlemail.com> writes:
>
>> I pasted that in to my shell on Debian Lenny and it worked. Did you try
>> another gnome-osd-line without the xml?
>>
>
> like what ?
>
I tried to email you directly. But it bounced.
Like
"gnome-osd-client hello"
for example .....
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: OSD alerts for appointment reminders (+ erc hook to use OSD)
2008-09-29 18:44 ` Richard Riley
@ 2008-09-29 18:48 ` Cezar Halmagean
0 siblings, 0 replies; 9+ messages in thread
From: Cezar Halmagean @ 2008-09-29 18:48 UTC (permalink / raw)
To: Richard Riley; +Cc: emacs-orgmode
On Mon, 2008-09-29 at 20:44 +0200, Richard Riley wrote:
> Cezar Halmagean <cezar@mixandgo.com> writes:
>
> > Richard Riley <rileyrgdev@googlemail.com> writes:
> >
> >> I pasted that in to my shell on Debian Lenny and it worked. Did you try
> >> another gnome-osd-line without the xml?
> >>
> >
> > like what ?
> >
>
> I tried to email you directly. But it bounced.
>
> Like
>
> "gnome-osd-client hello"
>
> for example .....
yep, "gnome-osd-client hello" works perfectly
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-09-29 19:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 0:43 OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
2008-09-25 6:22 ` Paul R
2008-09-25 13:10 ` OSD alerts for appointment reminders (+ erc hook to useOSD) Chris Randle
2008-09-26 3:18 ` OSD alerts for appointment reminders (+ erc hook to use OSD) Richard Riley
2008-09-26 19:10 ` Cezar Halmagean
[not found] ` <87wsgyyb8j.fsf@cezar@mixandgo.com>
2008-09-27 15:45 ` Richard Riley
2008-09-29 18:38 ` Cezar Halmagean
[not found] ` <87hc7yol03.fsf@cezar@mixandgo.com>
2008-09-29 18:44 ` Richard Riley
2008-09-29 18:48 ` Cezar Halmagean
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).