You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

josephj11

Beginner

  • "josephj11" started this thread

Posts: 17

Location: Northeastern US

  • Send private message

1

Wednesday, May 12th 2010, 4:12am

korganizer - Using a script with a reminder

I tend to need early reminders for important events so I often set up events with reminders the morning of the event and one and two days in advance.

When korganizer displays a reminder for an event, i find it hard to read. I want to see the day name of the event (like "Today", "Tomorrow", or "Next Wednesday") and the name of the event (or be able to specify a custom image - that would be great). Instead, it tells me when the original event was scheduled (many of my events are recurring events and I have no interest in when I set them up a year ago) and the new date/time. I then have to look at a calendar to figure out what day it will be - kind of silly when I'm in a calendar application to start with.

I wasn't happy with this, so I wrote the following bash script.

Source code

1
2
3
4
5
6
#!/bin/bash
## korg_msg - Display a custom message when a calendar event occurs
## Copyleft 05/11/2010 JPmicrosystems

zenity --title "Scheduled Event" --info --text="${*}"
exit 0


Then, I went into one of my events and added a reminder for it.
In the reminder, I selected the Application/Script radio button and entered korg_msg as the script name (it's in my path) and "WNYLUG Meeting Wednesday Night" in the Arguments field.

This *almost* works great and, obviously, I can enhance the script later as needed - maybe even get it to display a custom image or icon so I know immediately what the event is.

The problem is that when the reminder occurs, the standard reminder window is still displayed and completely covers the new window that zenity produces and that also means that I have to close two windows now instead of one.

Is there a way to prevent the original reminder window from being displayed so that just my custom reminder shows up?
Since selecting the radio button for Application/Script automatically deselects the button for Display Reminder, I would have thought that this would be the default behavior.

If I can't disable the original reminder window, is there a way to get my new zenity window to display on top of it?

Is there a way my custom script can find and close the original reminder window (without causing any complications)?

I coded the script in bash/zenity, but if some other approach would be better, I'm open to it.

Of course, I'd like to have my cake an eat it and still be able to suspend a reminder if I want to. My script might be able to hanlde this if it can decide whether or not to close the reminder window and my window is on top.

If I (we) could get this to work right, it could be something that would appear like a major enhancement to end users for a relatively minimal investment in coding.

Thanks.

Joe - kubuntu karmic (x86) - kde 4.3.5