Linux for Users: Notes on Your Desktop
The notes described here, Wnotes, are useful for the times that you want a scratch pad sitting unobtrusively on one corner of your X Window System desktop. A Wnote is basically a simple window that lets you type, import, export, cut, and paste useful bits of text to and from other Wnotes and programs.
Each Wnote is completely self contained. Installing and using Wnotes requires that you can install programs that use the Xlib and libXpm libraries, which you may already have because most graphical programs use them. Once you've installed Wnotes, they run from the shell prompt as normal windows.
Unlike note programs like GNOME's Post-Its or Apple's Stickies, Wnotes do not use a special database to store notes. Instead, Wnotes use command line options, the X selection, and normal files for whatever note text you want to keep.
Wnotes are designed to be basic and flexible. The are compatible with GNOME's Nautilus desktop window manager, and provide options that allow them to co-exist with just about any desktop program available for Linux.
To install Wnotes, download the source archive from the link below, and following the instructions after unpacking the archive. You'll need a Linux or other UNIX-derived system, and the development tools necessary to build and install C++ programs from their source code. Then, typing "wnote" at a shell prompt pops up an empty note on the desktop.
Typing, "wnote -h," prints a list of command line options. You can select the font, the note's starting position and size, whether it stays above or below other windows, the colors of the note, an output file to save the text in, and an option to write the note's settings as a shell command.
Clicking on the close box in the upper left-hand corner of the note closes the note and exits. Clicking on the bar along the top edge moves the note, and clicking on the tab in the lower left-hand corner resizes the note.
Double clicking on a note causes it to stay on top of other windows. Double clicking again places the note below other windows, at least with window managers that use a standard background window. Because not all window managers do this, especially window managers that use desktop icons, the, "-a," and, "-z," command line options allow you to keep notes visible on the desktop without worrying too much about a specific desktop program's configuration.
To cut and paste text using the X selection, click on the text in the note and move the cursor to the end of the text you want to select. Then go to the window that you want to paste the text in, and click on the middle mouse button, or the right and left buttons simultaneously if you have a two-button mouse. To paste text into a note, highlight the text in the window where its located, move the mouse over to the note window, and, again, click on the middle mouse button. To keep the program simple, Wnotes use the selection instead of the clipboard, in which you copy text with, "Control-C," and paste it with, "Control-V," because more X programs support cutting and pasting using the selection.
Again, the notes don't use a database to hold information. They're designed to be simple and flexible, so they use only the text you type in the note itself, or provide on the command line with the, "-t," option. When you close a note, it prints the text on display, so you can redirect it to a file. The, "-o," option has the same effect. So in order to save the text of a note, you can use one of the following commands.
$ wnote >this_note.txt $ wnote -o this_note.txt
When opening a note, you can input text with the, "-t," option.
$ wnote -t "This is the text of the note."
Remember that you need to enclose the text in quotes if it contains spaces or carriage returns.
Together, the, "-t," "-o," and, "-c," options allow you to use shell commands to save note text, and the, "-c," option outputs not only the text of the note, but also the shell command and options that allow you to open the note again with the same text, color, and position. So, for example, to make a persistent note, you could use several commands similar to these.
$ wnote -bg blue -a -g 200x200+10+10 -c >note.out $ sh -c "`cat note.out`"
The text of the command line to open the note again is in, "note.out," after the note exits. When reopening it, you need to use both double quotes and backticks to expand the complete text of the command and options from the previous note.
Together these options allow many possible uses, while keeping the Wnotes program as simple as possible. Wnotes are not mini word processors, not yet at any rate, because in this version they provide only basic text editing capabilities, but the program offers many possibilities for expansion as you discover new uses for it.