
Table of Contents
When command line parameters are supplied, KAlarm does not display the list of scheduled alarms as described in Using KAlarm above. Command line options specific to KAlarm may be used to perform the following operations:
schedule a new alarm
control KAlarm's display mode
obtain help
Additional command line options are provided primarily to enable other programs to interface to KAlarm. They are described in the chapter Developer's Guide to KAlarm.
The command line must only contain options applicable to one KAlarm operation. If you want to perform multiple operations, you must invoke KAlarm multiple times with a single set of options each time.
The following options are used to schedule a new alarm:
Option | Description |
---|---|
-a , --ack-confirm | Prompt for confirmation when the alarm message is acknowledged. |
-A , --attach | Specify the path or URL of a file which is to be attached
to the email. This option may be repeated as necessary.
--mail must be specified with this option. |
--auto-close | Automatically close the alarm window after the expiry of the
--late-cancel period.
--late-cancel must be specified with this
option. |
-b , --beep | Make an audible beep when the message is displayed.
--speak , --play and
--play-repeat cannot be specified with this
option. |
--bcc | Blind copy the email to yourself.
--mail must be specified with this option. |
-c , --color , --colour
| Set the message background color to the specified Qt™ color name or hex code 0xRRGGBB. |
-C , --colorfg , --colourfg
| Set the message foreground color to the specified Qt™ color name or hex code 0xRRGGBB. |
-d , --disable | Disable the alarm. It will not trigger until it has been manually enabled. |
--disable-all | Disable alarm monitoring. This prevents any alarms from
being triggered until you re-enable alarms or restart KAlarm, e.g.
at next login.
--triggerEvent cannot be specified with this
option. |
-e , --exec | Specify a shell command to execute. If specified, this option
must be the last KAlarm option in KAlarm's command line. All
subsequent command parameters and options are interpreted as
forming the command line to execute. --file and
--exec-display and --mail cannot
be specified with this option.
--ack-confirm , --beep ,
--color and --colorfg are ignored
with this option. |
-E , --exec-display | Specify a shell command to execute to generate the alarm
message text. If specified, this option must be the last KAlarm
option in KAlarm's command line. All subsequent command parameters
and options are interpreted as forming the command line to execute.
--exec , --file and
--mail cannot be specified with this option. |
-f , --file | Specify the path or URL of a text or image file whose
contents are to form the alarm message. --exec ,
--exec-display and --mail cannot
be specified, and message must not be
present with this option. |
-F , --from-id
| Use the specified KMail identity as the sender of the
email. --mail must be specified with this
option. |
-i , --interval
| Set the interval between repetitions of the alarm.
Hours/minutes are specified in the format
nHnM , where n
is a number, e.g. 3H30M. Other time periods are specified in the
format nX , where
n is a number and
X is one of the following letters: Y
(years), M (months), W (weeks), D (days). If
--recurrence is also specified, Y (years) and M
(months) are not allowed.
Mandatory if --repeat or --until
is specified. |
-k , --korganizer | Show the alarm as an event in KOrganizer's active calendar. |
-l , --late-cancel
| Cancel the alarm if it cannot be triggered within the
specified period after the correct time.
Hours/minutes are specified in the format
nHnM , where n
is a number, e.g. 3H30M. Other time periods are specified in the
format nX , where
n is a number and
X is one of the following letters: W
(weeks), D (days).
The default value of period is 1
minute. |
-L , --login | Trigger the alarm every time you log in.
--interval , --repeat and
--until cannot be specified with this
option. |
-m , --mail
| Send an email to the specified address. This option may be
repeated as necessary. --exec ,
--exec-display and --file cannot
be specified with this option.
--ack-confirm , --beep ,
--color and --colorfg are ignored
with this option. |
-n , --name | Specify a name to help you to identify the alarm. |
-N , --notify | Display the alarm as a notification, not in a window.
--color , --colorfg ,
--play , --ack-confirm and
--auto-close cannot be specified with this
option. |
-p , --play | Specify the path or URL of an audio file to be played once,
either as an audio alarm or when the alarm message is displayed.
--play-repeat , --beep and
--speak cannot be specified with this
option. |
-P , --play-repeat | Specify the path or URL of an audio file to be played
repeatedly, either until Stop Play is used, or
for as long as the alarm message is displayed.
--play , --beep and
--speak cannot be specified with this
option. |
--recurrence
| Set the alarm to recur. Specify the recurrence using iCalendar
syntax (defined in
RFC2445),
e.g. “FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO”.
--until cannot be specified with this
option. |
-r , --repeat
| Set the number of times the alarm should be triggered, or if
a recurrence is specified with --recurrence , the
number of times the alarm should be triggered each time
--recurrence activates it (i.e. a repetition within
a recurrence). If --recurrence is not present,
specify -1 to repeat the alarm indefinitely.
--interval must be, and --until
cannot be, specified with this option. |
-R , --reminder
| Output a reminder alarm the specified length of time before
or after the main alarm and each of its recurrences (if any).
The period is specified in
the same format as described for --late-cancel .
By default, the reminder will occur before the alarm. To specify a
reminder after the alarm, prefix period
with + , e.g. +3D. This option cannot be
specified with --exec , --mail or
--reminder-once . |
--reminder-once
| Output a reminder alarm once, the specified length of time
before or after the first recurrence of the alarm. No reminder will
be displayed before or after subsequent recurrences (if any). The
period is specified in the same format as
described for --reminder . This option cannot
be specified with --exec , --mail
or --reminder . |
-s , --speak | Speak the message when it is displayed. This option requires
KAlarm to have been built with speech enabled and the Qt™ Speech
module to be installed and working. --beep ,
--play and --play-repeat cannot be
specified with this option. |
-S , --subject
| The subject line of the email. --mail must
be specified with this option. |
-t , --time
| Trigger alarm on the date or at the date/time specified.
Specify a date without a time in the format
yyyy-mm-dd[ TZ] ; specify a date and time
by [[[yyyy-]mm-]dd-]hh:mm[ TZ] (where
omitted, date fields default to the values for today).
If no time zone is specified, the local system time zone is
assumed. If a time zone specifier TZ is
present, it may be the name of a system time zone (e.g.
Europe/London ), or UTC
representing the UTC time zone. |
-v , --volume
| Set the audio volume for playing the audio file. This option
can only be used when --play or
--play-repeat is specified. |
-u , --until
| Repeat the alarm until the date or date/time specified.
Specify the date or date/time using the same syntax as for
--time . Note that if --time is
specified, the time zone will be taken from its value and no time
zone may be included in the --until value.
--interval must be, and
--repeat and --recurrence cannot
be, specified with this option. |
message | Message text to display or, if --mail is
specified, the body of the email message. |
Either a message text, --file
,
--exec
, --exec-display
,
--play
or --play-repeat
must be
specified; except as noted above, all the options are optional.
Two alternative examples which display a multi-line message with a red background at 10 p.m. on the 27th of this month are:
%
kalarm
-c
red
-t
27-22:00
"Remember to\nSTOP"
%
kalarm
-c
0xFF0000
-t
27-22:00
"Remember to\nSTOP"