The Alarm Edit dialog enables you to view and edit an alarm. When you first use KAlarm, a simplified form of the dialog is displayed, with only a small number of options visible. To see all options, click the button; to revert to the simplified dialog, click the button. KAlarm always remembers your last display choice whenever the Alarm Edit dialog is redisplayed.
You can configure the default values of many of the settings in the Alarm Edit dialog using the Configuration dialog's Edit tab.
The controls in the Action group box vary depending on the type of alarm being edited.
Display alarms display a window when the alarm triggers. Select the method used to generate the alarm window contents, using the combo box at the top:
Text message in order to enter an alarm message text (which may include newlines) in the edit box.
File contents to enter the path or URL of a text or image file whose contents are to be displayed in the alarm message. Use the button beside the edit box to display a file selection dialog. The Speak option is not available for this type of alarm.
Command output to specify that the alarm message text will be generated by a command which is executed when the alarm triggers. See Command Alarms below for details of how to enter the command or command script to execute.
The controls available for display alarms are:
The Sound option allows you to select whether an audible alarm should sound when the alarm message is displayed. Choose:
None to display the alarm silently.
Beep to sound a beep.
Sound file to play an audio file. Use the button on the right to display the Sound File dialog which lets you select a file to play and set volume and repetition options. If you hover the mouse over the selector, a tooltip will display the audio file currently selected.
In the Sound File dialog:
Enter the sound file path, or use the button beside the edit box to display a file selection dialog. You can listen to the selected file by clicking the play button to the left of the edit field. That button then changes function to allow you to stop playing when you have heard enough.
Check Repeat to continually repeat the audio file for as long as the alarm is displayed. (The alarm message window contains a button to stop playing the sound should you need silence but still want to display the alarm.)
Check Volume and adjust the slider control if you want to adjust the volume at which the audio file is played.
If you wish, you can fade the volume. Fading means to start playing the audio file at one volume and gradually change to the final volume, over a specified time interval. The final volume is that entered in Volume above. To enable fade, check Fade, and then enter the fade period in seconds in the Fade time field, and adjust the Initial volume slider.
You can use the button to test out the selected sound levels.
Use the button to select a font, and foreground and background colors, for the alarm message. In the Choose Alarm Font & Color dialog, check Use default font to display the message in whatever font is configured as the default at the time the message is displayed. To choose a specific font for the message, uncheck Use default font. (The default font and colors can be set in the Configuration dialog.)
The selected colors are shown in the alarm message text entry field.
Use the button to specify shell commands to execute before or after displaying the alarm. In the Special Alarm Actions dialog:
In the Pre-alarm action field, enter a shell command to execute before the alarm is displayed. Note that KAlarm will wait for the command to complete before displaying the alarm.
A pre-alarm action is only executed once when the alarm message is initially displayed, including when a reminder message is replaced by the actual alarm message. It is not executed in any of the following circumstances:
When a reminder message is displayed.
When the message is redisplayed after deferring the alarm, unless Execute for deferred alarms is checked.
When the message was displaying at the time you logged off and is then restored when you log back in.
When a recurring alarm triggers but the alarm message (or a deferred alarm message) from a previous occurrence of the alarm is still visible; in other words, when the previous occurrence of the alarm has not yet been acknowledged.
The pre-alarm action can be used to control whether to display the alarm message:
Check Cancel alarm on error to cancel the alarm if the pre-alarm command returns an error status. This will prevent the alarm message from being displayed, and any post-alarm action from being executed.
Normally, if the pre-alarm command returns an error, an error message is displayed and an error indication is shown in the alarm list. These error notifications can be prevented by checking Do not notify errors.
In the Post-alarm action field, enter a shell command to execute when the alarm is acknowledged (whether by clicking or by using the close button in the window's titlebar). It is not executed in any of the following circumstances:
When a reminder message is closed.
When you defer the alarm, except when the deferred alarm is finally acknowledged.
When the alarm message is closed due to logging out.
See Command Alarms below for details of how shell commands are executed.
Command alarms execute a command without displaying any alarm message.
This alarm type is not available if KDE is running in kiosk mode.
When the command is executed, the environment variable
KALARM_UID contains the event UID for the alarm. Note
that when the command is executed from the Alarm Edit dialog's
KALARM_UID will be
blank if it is a new alarm, or if the alarm has been modified in the
dialog, because the alarm only acquires a UID when it is saved in the
The controls available for command alarms are:
The Enter a script check box lets you choose whether to enter a shell command line or a script.
If this option is unchecked, you can enter a shell command line to execute. The command is passed straight to the default shell (defined by the
SHELLenvironment variable), and may include whatever options, parameters, piped commands, etc. are permitted by the shell in a single line command.
If this option is checked, you can enter the text of a script to execute. Remember to include a first line such as
#!/bin/bashto ensure that the correct command interpreter is invoked.
Use the Command Output group box to specify what you want to be done with any terminal output which the command produces when it executes.
Check Execute in terminal window to cause the command to be executed in a terminal window. You can choose which type of terminal window should be used in the Configuration dialog.
Check Log to file to save the command's output in a file. The output, prefixed by a heading showing the time at which the command was scheduled to run, will be appended to any existing contents of the file. Enter the file name in the edit box, or use the button beside the edit box to display a file selection dialog.
Check Discard to throw away the command's output.
Email alarms send an email without displaying any alarm message.
Fill in the recipients' addresses, the email subject line and the message body in the three edit fields. Use the button beside the addressee edit box to display your KDE address book from which you can select email recipients. Attachments may be added using the button. Note that attached files must still exist when the alarm is triggered; no copy is stored at the time the alarm is configured. To remove an attachment, highlight it in the drop-down list and click the button.
Set the following options:
The From combo box allows you to select which KMail identity to use as your email address for sending the email. This option only appears if your From email address in the Configuration dialog is set to Use KMail identities. Otherwise your email address is preset in the Configuration dialog, rendering this option inapplicable.
Check Copy email to self to send a blind copy of the email to yourself when the alarm is triggered. The email address to which the copy will be sent may be set in the Configuration dialog, the default being your email address set in the System Settings.
Audio alarms play an audio file without displaying any alarm message.
Set the following options:
Enter the sound file path, or use the button beside the edit box to display a file selection dialog.
Check Repeat to continually repeat the audio file until the Stop Play option is selected. To stop playing the file, select the → menu option, or click on the system tray icon and choose from the context menu. If you wish, you can set up a global shortcut key for this action.
If the alarm is a recurring alarm and it was deferred after it was last displayed, the Deferred Alarm group box shows the time the alarm was deferred to. displays a dialog which allows you to change the deferred time or to cancel the deferral.
In the Time group box, select either
At date/time to enter the date and time when the alarm is to be triggered. Check Any time if you want to specify only a date for the alarm: in this case the alarm will be displayed at the first opportunity on or after the configured start-of-day time, on the specified date. (Configuring KAlarm describes how to set the start-of-day time.)
For a non-recurring alarm, the date/time which you enter must be in the future, or if you enter only a date it must be today or later. For a recurring alarm, there are no such restrictions since the start date/time will be automatically adjusted to the first recurrence due after the current time.
Time from now to enter how long after now (in hours and minutes) the alarm should be triggered.
If desired, choose a time zone to apply to the alarm. This time zone is used for all dates and times relating to this alarm, including recurrence and exception dates and times. Normally, you should leave the time zone controls unchanged unless you have a good reason to change them.
The time zone controls are displayed only when the selected time zone is different from the default time zone set in the Configuration dialog, or if you click the button.
In the combo box, choose the time zone which this alarm is to use. When creating a new alarm, this is initially set to the time zone selected in the Configuration dialog, which will be your computer's time zone unless you have changed it.
Check Ignore time zone if you want to use the local computer time (on whichever computer KAlarm happens to be running on at the time), ignoring time zones.
You are recommended not to select this option if the alarm has a recurrence specified in hours and minutes; if you do, the alarm may occur at unexpected times after daylight saving time shifts.
For a display alarm, check Reminder if you want to display a reminder either before or after the main alarm and each of its recurrences (if any). Enter how long in advance or afterwards, using the edit controls beside the check box. Note that if the alarm recurs, the reminder period is normally limited to being less than the recurrence or sub-repetition interval.
Reminders are not displayed for sub-repetitions within a recurrence. Reminders are only shown for each main recurrence of the alarm.
If the alarm recurs, check Reminder for first recurrence only if you only want a reminder for the alarm's first recurrence. If this is checked, and it is an advance reminder, the reminder period is not subject to the normal limit of being less than the recurrence or sub-repetition interval.
The late-cancelation options determine how an alarm is treated after its scheduled time:
The Cancel if late check box determines what happens if the alarm cannot be triggered at its scheduled time.
Check this box to cancel the alarm if it cannot be triggered within a specified time period after the right time. The time period is selected using controls which appear when you check the box. For example, if you enter a time period of 1 hour, the alarm will be triggered at the first opportunity up to an hour after it is due, but if it cannot be triggered within an hour its activation will be canceled.
The lateness of date-only alarms, i.e. ones for which the Any time option is selected, is calculated from the start-of-day time on the alarm's scheduled date.
Leave the box unchecked to trigger the alarm at the first opportunity starting at the scheduled time, regardless of how late it is.
An alarm can only be triggered while you are logged in, and while both X and KAlarm are running.
Check Auto-close window after this time if you want the alarm window to be automatically closed if it is still showing at the expiry of the late-cancelation time.
Specify whether or how the alarm should be repeated using the Recurrence tab.
The alarm's basic repetition characteristics are displayed for convenience in the title of the Recurrence tab. The recurrence interval is shown first, followed by any sub-repetition interval set up using the button.
In the Recurrence Rule group box, set the recurrence type or time period as follows:
To trigger the alarm once only, select No recurrence.
Select At login to trigger the alarm whenever you log in, until its scheduled end time. Then, at its scheduled end time it will finally be triggered one last time. (Note that an alarm repeated at login will also be triggered any time you restart KAlarm.)
To make the alarm recur at regular intervals, select one of the time period types and then enter in the Recur every box how many time periods should elapse between recurrences. For example, to repeat every fortnight, you could select Daily and enter a value of 14, or select Weekly and enter a value of 2. Depending on the time period type selected, you may have further options:
For a weekly recurrence, check each day in the week on which you wish to trigger the alarm.
For a monthly recurrence, you may select either a fixed date, or a position (e.g. the second Tuesday).
For a yearly recurrence, you may select either a fixed day in the month, or a position in a month (e.g. the last Saturday in May). Check each month of the year in which you wish to trigger the alarm.
If you set up a yearly recurrence for February 29th, you can specify how it is to be handled in non-leap years by selecting the appropriate February 29th alarm in non-leap years option:
None: the alarm will occur on February 29th in leap years, but will be suppressed in non-leap years.
28 Feb: the alarm will occur on February 29th in leap years, and on February 28th in non-leap years.
1 Mar: the alarm will occur on February 29th in leap years, and on March 1st in non-leap years.
To set a daily alarm to occur only on weekdays, use a weekly recurrence and check each weekday.
In the Recurrence End group box, set the overall recurrence time span as follows:
Select No end to continue the repetitions indefinitely.
Select End after to specify the total number of occurrences of the alarm.
Select End by to specify the date/time until which the alarm will be repeated. Note that this uses the same time zone as the alarm's start time.
The end date/time determines when the last main recurrence will be, but does not limit sub-repetitions. If sub-repetitions are configured, they will trigger as normal after the last main recurrence, regardless of the end date/time.
The Exceptions group box allows you to exclude certain date/times from the recurrence which you have set up. Note that these controls are not shown in the simplified form of the Alarm Edit dialog: to see them, click .
The list of exceptions (i.e. excluded date/times) is shown on the left. To add a new exception, enter a date on the right and press . To change an exception, highlight it in the list, enter the new date on the right and press . To delete an exception, highlight it in the list and press .
You can restrict an alarm not to occur on holidays by checking Exclude holidays. This does not change the way the alarm is scheduled; it simply suppresses the alarm whenever it happens to trigger on a holiday. You can select your holiday country or region in the Configuration dialog.
You can restrict an alarm to occur only during working time by checking Only during working hours. This does not change the way the alarm is scheduled; it simply suppresses the alarm whenever it happens to trigger outside working hours. Work days and working hours are set in the Configuration dialog.
You can use the button to set up a repetition within a repetition. In this case, each time the alarm is due as specified in the main recurrence, instead of being triggered just once it is triggered repeatedly in accordance with your sub-repetition specification. For example, to set up an alarm which repeats every hour from noon to 6 pm each Thursday, you would set up a weekly recurrence on Thursday at 12:00, and use the Sub-Repetition dialog to specify an interval of 1 hour and either a count of 6 or a duration of 6 hours.
In the Sub-Repetition dialog which is displayed when you click the button, check Repeat every to set up a repetition, or uncheck it to remove the repetition. If Repeat every is checked, set up the repetition as follows:
Enter the time interval between repetitions in the controls beside Repeat every. Select the desired time units (e.g. days) and then enter the number of units.
Specify either the repetition count or its duration:
Select Number of times to enter how many times the alarm should be triggered after the main recurrence. So, for example, to make the alarm occur 4 times at each main recurrence, i.e. 3 additional times, you should enter 3 here.
Select Duration to enter the total time period during which the alarm should be repeated. This need not be an exact multiple of the repetition interval; it will automatically be rounded down when you click .
To prevent overlapping sub-repetitions for the same alarm, a sub-repetition's duration is restricted to be less than the longest interval between main recurrences. Each time the alarm recurs as specified in the main recurrence, any still active sub-repetition which started at the previous recurrence is automatically cancelled.
For display alarms, the Confirm acknowledgment check box lets you specify whether you will be prompted for confirmation when you close the alarm message window. This may be used as a safeguard against accidental acknowledgment of alarms.
Select Show in KOrganizer to add the alarm to KOrganizer's active calendar, where it will appear as an event without an alarm. This option allows you to track alarms in KOrganizer while still making use of KAlarm's functions.
If you later modify or delete the alarm in KAlarm, the KOrganizer event will be modified or deleted correspondingly. But if you change the event in KOrganizer, the alarm in KAlarm will not be affected.
Press the button to select a template to preset the dialog with, as described in Creating and Manipulating Alarms.
Press the button to test the alarm and check whether it works correctly. The alarm is executed just as if it had been scheduled in the normal way. In the case of an audio alarm, press the button a second time to stop playing the sound file.
Press the button when all details are correct, to add the alarm to the scheduled list. Note that when editing an existing alarm, the button is disabled while no changes have been made.