xpostit
NAME
xpostit - X window system Post-it(r) notes
SYNOPSIS
xpostit [ -toolkitoptions ... ] [ -options ... ]
DESCRIPTION
Xpostit provides a mechanism for manipulating on-screen
Post-it(r) notes. All six sizes of Post-it notes may be
displayed, edited, and saved to disk files. In addition,
any on-screen note may be resized to any arbitrary size
either when it is created or at a later time.
All notes can be "hidden" - the notes are still available
but not shown on the screen until requested by the user.
Hidden notes will stay hidden when xpostit is exited and
then restarted (as long as the user saves all notes before
exiting).
When xpostit is first invoked, it creates a small window
with a plaid background. This is the control window for
xpostit. Additionally, if any notes were stored in the save
directory (see below), these will be placed on the screen at
their last locations, unless they were hidden when saved
(see below). Each Post-it note, when created, makes another
window on the screen. Xpostit is controlled using the mouse
buttons and a menu. The Post-it notes are controlled by
using a drop down menu.
OPTIONS
Xpostit accepts all of the standard X Toolkit command line
options along with the additional options listed below.
-bs number
Specifies the size of the character buffer in which
to save each Post-it note. A note may not contain
more than this number of characters, including
newlines. The default is 1024.
-nw pixels
Allows the user to specify the width, in pixels, for
a single character of text. This is dependent on
the font being used, but the Athena Widget set and
the Xt Intrinsics apparently doesn't allow a program
to determine this value at run time. This value is
used to determine the width of the Name dialog box,
which is used to provide a title for a given note.
The default value for this option is 10 pixels.
-ao offset
The offset is specified in pixels and is used to
determine the X and Y offsets from an anchor note
for a note being cascaded. The default value is 15
pixels.
-dir path
Specifies the path name of the directory in which to
store saved Post-it notes. If path begins with a
`/' it is taken as-is; if it does not begin with a
`/', the path is taken relative to the home
directory. If the named directory does not already
exist, then xpostit attempts to create it. The
default is .postitnotes.
-tmpdir path
Specifies the path name of the directory to use for
temporary files. By default ``/tmp'' is used.
-printcmd cmd
This must be a quoted command string that can be
used as the format string to sprintf(). It must
include "%s" for the temporary file name used when
printing a note. The buffer created with sprintf(),
this option value, and the temporary file name is
passed to the system() call to print the note. By
default, the printcmd value is ``lpr %s''.
-calendarcmd cmd
This is the command used to produce a calendar for
the current month. On most Unix systems this will
be ``cal'', which is the default. The output from
this command is redirected to a temporary file and
then inserted into a note at the current cursor
location.
-emailcmd cmd
The "Email" option from the notes menu will pop up a
window prompting for an email address. The
-emailcmd command line option or .emailCmd resource
can be set to your systems mailer command. The
mailer must accept the text of the mail via standard
input (actually as a pipe from "cat tmpfile").
"cmd" must be a Unix style command in printf()
format. See the section on Configuring the mailer.
-sb Enables scroll-bars. If specified, a scroll bar
will be attached to each Post-it note.
-sv Enables save-on-exit. When specified, this option
tells xpostit to save all Post-it notes to disk
files when exiting. If not specified, notes can be
saved to disk files manually by the user or via the
autosave feature. It is useful to specify this
option since hidden notes cannot be saved unless
either the "Save All Notes" option is used or the
autosave option has not been disabled. Its also to
use this option since its not guaranteed that the
autosave feature will have saved all notes since
their last updates when xpostit exits.
-c Enables compatibility mode. Initially this is for
notes created using the %! magic cookie. In version
2.2 this was changed to %%!! because the original
cookie was the one being used for Postscript files.
In the future this mode may cover other items that
are not compatible between versions/releases.
-ns Disables the autosave feature.
-na Disables alarms.
-interval
Sets the timeout interval (in seconds) for when the
autosave timeout should expire. When this timer
expires, all notes are automatically saved to disk.
The default value is 10 minutes.
-help Displays a usage message.
WIDGET USAGE
Xpostit uses several widget types to construct the objects
it uses.
The control window is a Plaid widget called ``Plaid''. This
is a widget designed by David A. Curry, the original author
of xpostit.
The menu is a pop-up shell called ``Menu'' containing a
SimpleMenu widget. From this menu the hidden notes menu can
be popped up. The hidden notes menu is also a SimpleMenu
widget.
Each Post-it note is a pop-up shell called ``PostItNote'',
containing a Form widget called ``Note'' which contains a
Text widget called ``NoteText'', and a MenuButton widget
called "Options". The Options button, when selected, pops
up a drop-down menu called "OptionsMenu" (see the Xpostit.ad
application defaults file). Inside of this menu are five
menu items called ``Save'', ``Erase'', ``Destroy'',
``Hide'', and ``Name''.
The confirmation box is a pop-up shell called ``Confirm'',
containing a Form widget called ``Buttons'' which contains
two Command widgets called ``Confirm'' and ``Cancel''.
There is also dialog box which pops up when the Name menu
item is selected which is called "Dialog".
RESOURCES
Xpostit understands all of the core X Toolkit resource names
and classes as well as those listed below, which are all of
class Xpostit.
.bufSize
Specifies the size of the character buffer used to
store a Post-it note. The default is 1024.
.nameWidth
See the -nw command line option. The default value
for this resource is 10.
.noteDir
Specifies the path name of the directory in which to
store saved notes. The default is .postitnotes.
.tmpDir Specifies the path name of the directory to use for
temporary files. By default ``/tmp'' is used.
.printCmd
This must be a quoted command string that can be
used as the format string to sprintf(). It must
include "%s" for the temporary file name used when
printing a note. The buffer created with sprintf(),
this option value, and the temporary file name is
passed to the system() call to print the note. By
default, the printcmd value is ``lpr %s''.
.calendarCmd
This is the command used to produce a calendar for
the current month. On most Unix systems this will
be ``cal'', which is the default. The output from
this command is redirected to a temporary file and
then inserted into a note at the current cursor
location.
.emailCmd
The "Email" option from the notes menu will pop up a
window prompting for an email address. The
-emailcmd command line option or .emailCmd resource
can be set to your systems mailer command. The
mailer must accept the text of the mail via standard
input (actually as a pipe from "cat tmpfile").
"cmd" must be a Unix style command in printf()
format. See the section on Configuring the mailer.
.saveNotes
Controls the state of the save-on-exit option. The
default is false.
.scrollBar
Controls placing scroll bars on Post-it notes. The
default is false.
.compatibility
Enables compatibility mode. This shouldn't really
be set in the app-defaults file. If you wish to use
this feature, use the -c option.
.interval
Sets the timeout interval (in seconds) for when the
autosave timeout should expire. When this timer
expires, all notes are automatically saved to disk.
.anchorOffset
The offset is specified in pixels and is used to
determine the X and Y offsets from an anchor note
for a note being cascaded. The default value is 15
pixels.
.noSave If set to true then the auto-save feature is turned
off.
.noAlarm
If set to true then the alarms feature is turned
off. This will have the effect of graying out the
``Set Alarm'' and ``Unset Alarm'' options from each
Notes pull down menu.
ACTIONS
It is possible to rebind the mouse buttons in the Plaid
widget to perform different functions by changing the
widget's translations. It is not recommended that other
actions (as specified in the application defaults file) be
changed, however. The raise() action, normally bound to the
left mouse button, raises all notes. The lower() action,
normally bound to the middle mouse button, lowers all notes.
The menu raising function, normally bound to the right mouse
button, is performed by calling the actions
XawPositionSimpleMenu(Menu) and MenuPopup(Menu).
This can now be configured by changing the following lines
in the Xpostit.ad file:
Xpostit*Plaid.Translations: #replace\n \
<Btn1Down>: raise() \n\
<Btn2Down>: lower() \n\
<Btn3Down>: XawPositionSimpleMenu(Menu) MenuPopup(Menu)
to the following:
Xpostit*Plaid.Translations: #replace\n \
<Btn3Down>: raise() \n\
<Btn2Down>: lower() \n\
<Btn1Down>: XawPositionSimpleMenu(Menu) MenuPopup(Menu)
THE CONTROL WINDOW
Xpostit allows three operations to be performed from its
control window. Pressing the left mouse button in the
control window will cause all Post-it notes on the screen to
be raised to the top. Pressing the middle mouse button in
the control window will cause all Post-it notes on the
screen to be lowered to the bottom. Pressing the right
mouse button in the control window raises the xpostit menu.
THE PLAID MENU
The xpostit plaid menu provides the following selections:
Create 1.5x2 Note
Create a new Post-it note, 1.5 inches tall by 2
inches wide. The window will normally need to be
positioned using the window manager.
Create 2x3 Note
Create a new Post-it note, 2 inches tall by 3 inches
wide.
Create 3x3 Note
Create a new Post-it note, 3 inches square.
Create 3x4 Note
Create a new Post-it note, 3 inches tall by 4 inches
wide.
Create 3x5 Note
Create a new Post-it note, 3 inches tall by 5 inches
wide.
Create 4x6 Note
Create a new Post-it note, 4 inches tall by 6 inches
wide.
Raise All Notes
Raise all Post-it notes to the top. This is
equivalent to pressing the left mouse button in the
control window.
Lower All Notes
Lower all Post-it notes to the bottom. This is
equivalent to pressing the middle mouse button in
the control window.
Unhide All Notes
All notes that have been hidden will be unhidden.
Save All Notes
Save all Post-it notes to disk files in the save
directory.
Hidden Notes
Pops up another menu which lists all the notes that
are currently hidden. The list contains the names
of the notes so it is wise to give a note a
meaningful name (using the Name option from the
pull-down menu of each note) before it is hidden.
Cascade Notes
Each note can be "anchored". If one or more notes
are anchored and the "Cascade" option is chosen from
the xpostit menu, then all the visible notes are
cascaded onto the anchored notes. An attempt is
made to distribute all visible notes evenly amongst
all the anchored notes. Each note also has an
"unanchor" option as well. Only one of "anchor" or
"unanchor" is sensitive for any given note. Hidden
notes are not affected by the cascade feature. The
default offset for cascaded notes (from the anchor)
is 15 pixels. This can be changed with the -ao
option or the .anchorOffset resource.
Find A Note
If you "lose" a note and want to bring it up at the
cursor, select ``Find A Note'' from the plaid menu.
A pop up window of all notes will be presented.
Select the note you want and if its not hidden it
will pop up at the cursor. If it is hidden it will
pop up in the appropriate spot. The ``Cancel''
button will close the pop up if no note is selected.
Exit Exit xpostit. If the -sv command line option was
given, or the saveNotes resource is true, all Post-
it notes will be saved to disk first.
To select an item from the menu, drag the mouse cursor to
that item and release the mouse button.
THE HIDDEN NOTES MENU
This menu pops up from the ``Hidden Notes'' option of the
plaid menu. It functions the same as the plaid menu except
the menu does not disappear until either a menu option is
selected or the label (at the top of the menu) is clicked
on.
THE POST-IT NOTE
Each Post-it note is made up of three parts (plus an
optional scroll bar): a Title bar, a text window where the
text of the note is stored, and an Options pull-down menu.
To enter text into a Post-it note, simply move the mouse
cursor into the text window and start typing. Since the
text window is actually a Text widget, all the Text widget
translations are accepted. Essentially, this means you can
use most of the EMACS control keys in the window.
Additionally, the various mouse buttons used for
manipulating the selections and cut buffer are understood.
After entering text in the Post-it note, you may wish to
save the note in a disk file. This way, if the machine goes
down, or if you exit xpostit, the Post-it note can be
restored when you restart xpostit. (Post-it notes are also
saved automatically (if saveNotes is true) if a SIGHUP,
SIGINT, SIGTERM, or SIGQUIT signal is received.) To save the
note to a disk file, click on the Options button and drag
the mouse cursor to the menu item labeled ``Save'', then
release the mouse button. The note will be saved as the
file ``noten'' in your save directory, where n is some
sequence number. Note that the ``Save'' menu item will not
allow you to save unless something have been typed in the
Text of the note, the name of the note has been changed, or
the text of the note has been erased. This is a good way
for checking if you've made changes to the note. If the
Save menu item is "insensitive" (grayed-out) then you
haven't made any changes to the Text of the note. NOTE: it
is important to remember that until you have pressed the
``Save'' button, any changed data in the Post-it note is not
saved on disk and can be lost if the system goes down or
xpostit exits.
To erase the entire contents of the text window, you can
click on the Options button and select the ``Erase'' menu
item. This will bring up a confirmation window, which has
two buttons labeled ``Confirm'' and ``Cancel''. If you
press the ``Confirm'' button, the text will be erased. If
you press the ``Cancel'' button, the operation is canceled,
and nothing will happen. NOTE: erasing the text in the
window does not affect any contents of the note you have
saved on disk unless you press the ``Save'' button again.
To destroy a Post-it note, getting rid of its window on the
screen and the disk file it is saved in, click on the
Options button and select the ``Destroy'' menu item. This
will bring up a confirmation window as described above. If
you confirm the operation, the Post-it note will disappear
from the screen and the disk file it was saved in will be
deleted.
To rename a note, you can click on the Options button and
select the ``Name'' menu item. This will bring up a dialog
box, which has two buttons labeled ``Confirm'' and
``Cancel'' as well as a field to enter text for the new
name. If you press the ``Confirm'' button, the new name
will be placed in the title bar of the note. If you press
the ``Cancel'' button, the operation is canceled.
To hide a note, you can click on the Options button and
select the ``Hide'' menu item. This will cause the note to
disappear from the screen. To bring the note back, select
the ``Hidden Notes'' option from the plaid pull-down menu.
Then select the note you wish to bring back up. NOTE: The
hidden notes will not stay hidden between xpostit sessions
unless you first select the "Save All Notes" option from the
plaid menu or options to save on exit (see discussion above)
have been set.
To anchor a note you can click on the Options button and
select the ``Anchor'' menu item. This will mark the note as
an anchor note. Anchor notes are the bottom note, the
"anchor", when the Cascade option is chosen from the xpostit
menu.
To unanchor a note you can click on the Options button and
select the ``UnAnchor'' menu item. This will remove the
note from the list of anchor notes.
Note that only one of the ``Anchor'' or ``UnAnchor'' options
will be sensitive (allow user selection) at any time. They
are mutually exclusive options.
To print a note, you must have configured xpostit with a
valid print command (via the -printcmd command line option
or the .printCmd resource). Select the ``Print'' option
from a notes pull down menu. The text of the note is
printed.
To email a note use the ``Email'' option. This option from
will pop up a window prompting for an email address. Fill in
the text field and select ``Accept'' to send the message.
The notes title will be used as the subject line. Select
``Cancel'' to cancel sending the message.
To set a notes alarm, select ``Set Alarm'' from the notes
Options pull down menu. A window pops up with month, day,
hour and minute fields. Set each of these for the day and
time you wish the alarm to go off. If you wish to save this
value between invokations you should use either the notes
``Save'' option or the ``Save All Notes'' option from the
plaid windows menu. When a notes alarm is set an icon of a
clock will be visible next to the Options menu button in the
notes menu bar.
To turn off the a notes alarm, select ``Unset Alarm'' from
the Options pull down menu. This will disable the alarm for
that note and remove the clock icon from the menu bar.
To insert a copy of the current calendar month in the text
select the "Insert Calendar" option from the notes menu.
The text will be inserted at the current cursor location, so
you should be sure to position the cursor first. You can
position the cursor by just clicking in the text window of
the note.
CONFIGURING THE MAILER
In order to use your systems mailer with the Email feature
of xpostit, you need to configure the appropriate mailer
command using either the -emailcmd command line option or
the .emailCmd resource. The format for both of these is
the same: a double-quoted string which contains the name of
the mailer command, the option for providing the subject
line, and the addressee. By default the Unix command "mail"
is used. It is defined in the Xpostit.ad (and in the source
code fallback resources) as:
"mail -s\"%s\" %s"
The format is the standard format used by printf(). The
first string parameter is the subject line. The
backslashes are required so that the following double quotes
are passed properly to the shell. If these are left out the
subject will be truncated to the first word of the first
string parameter and an attempt will be made by the mailer
to send mail to non-existant recipients.
The second string is the addressee. The order of the string
parameters is required (subject first, addressee second).
The mailer command accpets the text of the mail via standard
input. This too is required.
If you use elm, you might want to change this to:
"elm -s\"%s\" %s > /dev/null"
The difference here is that elm prints out a few messages
when it runs in batch mode and you should send those to
/dev/null.
SEE ALSO
X(1)
BUGS
The sizes of the Post-it notes are only as accurate as the
display dimension and resolution returned by the server. On
the Sun server and possibly others, this means they aren't
all that accurate.
On Linux systems the word wrap feature of the Text Widget
appears broken. The words get wrapped to the next line but
they do not get erased from the previous line. I'm not sure
how to fix this. You can resize the note using the window
manager to clear the problem, or scroll the note window.
There was a Warning that writes to stdout regarding a null
child being managed in the 2.1 version. I think I found
what was causing it. It didn't seem to cause any problems
before, so if its not fixed, its no big deal.
The message: ``Warning: XtRemoveGrab asked to remove a
widget not on the list'' may be written to stdout after an
alarm popup is dismissed. This is a timing issue in the X
libs, I think, and doesn't appear to cause any problems.
The Dialog used to name a note doesn't limit the number of
characters that can be used in a name, although it does
prevent (by use of translations) a user from putting a
newline in the text. The drawback to not limiting the
length of the name is that the dialog box's text field won't
resize or scroll to the right as characters are typed off
the right hand edge of the field. Bummer dude. This might
be fixable if key events force a resize on each keystroke.
Hmmm. I'll have to think about that one.
The Hidden Notes menu, if it has no entries, can be fairly
small (with only a title). Since this menu doesn't go away
unless you click on it, it can get hidden under other
windows running under a window manager which uses autoraise.
You could probably change this with translations, but I like
having the menu stay up till I tell it to go away. Under
Linux and fvwm, I have one desktop devoted to Post-It notes
so I don't worry too much about other windows hiding the
menu.
The -c option has been reported to not read in old notes
properly. It eats the first line. This can be worked
around by adding a blank line to the old notes. However, I
couldn't reproduce this problem. I suggest creating a
backup of your old notes before trying to run with the -c
option, just in case.
Without a color display for canary yellow notes and red
plaid, the aesthetic value of xpostit cannot be fully
appreciated.
AUTHOR
Originally by David A. Curry, SRI International.
Name, Save (sensitivity), Hidden Notes, changes to buttons
(to make them menus), Email, Print, and all other
enhancements (from version 2.0 on) by Michael J. Hammel
(mjhammel@csn.net).
``Post-it'' and the plaid design are registered trademarks
of 3M.