These are a couple of simple utilities I put together for my personal use,
but which might be of some value for somebody else as well.
Thery're written in different languages, and their style varies somewhat as
my preferences changed by time.
For a first attempt, here are three of them, now all written in python,
although they started out being put together with different helper programs.
This is still reflected by the use of one or another external utility.
As I personally prefer the GTK2 appearance much over that of GTK3, they still
have to rely on Python2 and the "gtk" module available for it.
Sadly, there is no GTK2 module around for Python3, so going to the current Python
version forces one to use GTK3 with its - in my opinion - clumsy and clunky widgets,
where I dislike particularly the huge, space wasting, spin button design besides its
generally much bigger control elements which are mainly wasting screen area.
But as the programming interfache hasn't changed a lot from GTK2 for GTK3, it might
be rather easy for a proficient user to modify these utilities for its use. Just
expect to have to increase every size setting by some appreciable amount for correct
display.
The text fields in the window show the beginnings of the content of all areas of the X11
(or rather GTK) clip buffer (or two consecutive double quotes, '""', for an empty buffer).
There are 4 of them:
This is the basic display the crontab editor presents initially. There ae no comments or empty
lines, just the active entries are shown. Ir nontheless does keep all the other stuff intact.
To modify an entry, double click on it to display the editor dialog window (overlying the base display
window):
This dialog presents all fields, "nicely" separated, for modification. All fields are handled as text
only because of the rather complex syntax that some cron daemons understand. That way, you can
use all of your cron daemon's sophistication.
The functions of the entry fields is shown above each one. The upper row of fields containes the five
time specitications: .
This utility was created to remind me - the user - of actions required to be done at fixed times even
during other attention capturing activities. It simply allows the specification of a time of day and
select one of a pre-defined set of actions. This list is specified within the program and can be modified
and extended as needed.
To perform its intended function, the program creates a small script containing the selected message
text. The script template is defined within the program and can be modified to suite the user's needs.
This script is then passed to the "at" command, which will execute it at the set time.
As set it up in the provided version, the script plays a sound to evoke attention, and shows the message
on the screen using the Xdialog program. The example set up does just that, using the addtional external
script "play_sound" in the directory where the program resides.
By modifying and extending this embedded script, it should be possible to perform whatever action the
user wants. The place where the message text will be inserted has to be marked with the string "{0}",
and in addition one can insert the program's storage path with the string "{1}", e.g. to execute an
external script to play an alerting sound.
After execution by the "at" program, the message script will be automatically removed.
Cautionary remark: There is no provision to check the time given. This means that specifying
a time before the current time may cause the message to appear on the following day at the
time given, or never.
Impressum | © 2001 - Mail an den Autor & Betreiber: Sieghard.Schicktanz@SchS.de |
---|
Dr. Sieghard Schicktanz Telefon 08171-16402 ° Fax 08171-405909 Kreidestr. 12 E-Mail: Sieghard.Schicktanz@SchS.de 82547 Eurasburg Inhaber: Dr. Sieghard Schicktanz (für Inhalte verlinkter Seiten kann ich natürlich keine Verantwortung übernehmen)