Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-11-2010, 11:27 PM   #1
Registered: Nov 2007
Location: Northeastern USA
Distribution: kubuntu
Posts: 140

Rep: Reputation: 79
korganizer - Using a script with a reminder

Note: I also posted this in: -> KDE ->(K)Office & PIM.
I wasn't sure whether to post it here under Software or Programming.

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.

## 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.


Joe - kubuntu karmic (x86) - kde 4.3.5
Old 05-11-2010, 11:48 PM   #2
Sergei Steshenko
Senior Member
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
AFAIR, windows have "front" attribute which can be set. So I would start digging how to set the attribute - a number of times if necessary, i.e. if the KDE windows is created after the 'zenity' one.
Old 05-12-2010, 07:29 PM   #3
Registered: Nov 2007
Location: Northeastern USA
Distribution: kubuntu
Posts: 140

Original Poster
Rep: Reputation: 79
Thanks. From what I can see, none of the "dialog" utilities I am aware of have an option for setting a "front" attribute (or any other window attribute for that matter).

I'm sure this can be done in some other programming languages or utilities. Any suggestions - especially examples I can copy?

I don't know perl or python. I did a bit of c programming a long time ago, but no gui stuff.



bash, kde, korganizer, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Making a backup reminder script LXer Syndicated Linux News 0 09-27-2007 04:30 PM
stop Korganizer Reminder Daemon from loading RanDrake10 Linux - Desktop 5 07-24-2007 03:57 PM
korganizer(3.5) alarm/reminder script argument problem mattsn Linux - Desktop 1 12-05-2006 11:35 PM
korganizer save me!!!!!!!! little_penguin Linux - Software 1 08-06-2006 12:50 PM
ad reminder jeremy LQ Suggestions & Feedback 8 01-09-2003 04:02 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration