'the following line is here to please nroff, in case you use this as manpage .nf # # README for tkPostit 1.2 # # Copyright 1993 - A Rubini - DIS - Universita` di Pavia - Italy # #### 1. tkPostit ----------- This is an enhanced replacement for the package xpostit. Current version is 1.2. TkPostit is a for-fun project, and won't take much of my time; Nonetheless, I will be happy to apply sensible patches to this code, wherever they come from. 2. Copying ---------- No licence or fee. You can do anything, with these files provided some pointer to the original author or organizazion is included somewhere in the credits. 3. Warranty ----------- None, noone is liable and so on.... 4. System Requirements ---------------------- Tk 3.3 or greater, tcl 7.0 or greater. 4. Features of tkPostit ----------------------- -> Backup copies of your notes -> Backup on destroying -> Dealyed backup, to ease your computer -> optional autosave on Mouse-leave -> Optionally mantains geometry between sessions -> Is provides optional emacs key-bindings -> User-level overrriding of defaults ====> It is written in the tcl language 4.1 Enhancements over version 1.0 --------------------------------- - fixed: there was a possible loss of geometry between sessions - fixed: notes did enlarge themselves at the rate of 1 char per session. - fixed: the code was quite Q&D - fixed: the language in the docs was Q&D, too. - backups are no more mandatory - the user can choose wether to keep backups or loose them - geometry save_between_session is now optional - two configuration files are read by default - one is system-wide and the other is user-wide - autosave on modification of a note is now optional - there's a new optional save-every-30-minutes or so, and you choose the time interval - bindings are now quite configurable at user level - support for menus is there - the user can write his own menus and bind them to events - a capability of run-time reconfiguration is added - notes can be iconified or withdrawn, either individually or all at once - a note-level alarm capability is added (sth like 'iconify for 15 minutes and then pop up yourself') 4.2 Known Bugs -------------- - notes can be lost outside the screen, due to strange interactions with the window manager, in this case you should edit the note file. - tkpostit has problems placing windows if it is run before the wm - all windows fall at top left, thus fixing bug 1 :-( 5. Future of tkPostit --------------------- Near December 15th, I'll release 1.4, with the following enhancements: - Use of text-widget tags to format text in the notes, and optionally to bind commands to them. - User-level configuration of the command bar on top of the note. - Capability of simple editing of disk files. - a Makefile or sth like, to ease installation - a manual page 6. Compiling and installing --------------------------- No compiling, just edit the script and copy it where you like: - You should put the pathname of your wish in place of '/usr/local/bin/wish' in the first line of tkpostit itself. - Then, the first three 'Set' lines must be modified to retain your actual pathnames (though perhapd thei're already right). - Any other value can be overriden by system or user cfg files, however, nobody denies to edit tkpostit itself, though this practice can prevent you from easy upgrading to new releases. I suggest to edit only the pathname for the default bitmap. - Finally, you should copy tkpostit in his final directory (/usr/local/bin or $HOME/bin or such). The bitmap should go where tkpostit will look for it, while this README can be directly used as a man page, by copying and renaming it, like "cp README /usr/man/manl/tkpostit.l" 7. Configuration of tkpostit-1.2 (optional) ------------------------------------------- This sections explains the options you can set, and the procedures you can invoke. This is only needed to tailor tkpostit to your personal taste. 7.1 Settings (and default values) --------------------------------- Set my_name [exec which tkpostit] This is the name by which tkpostit is invoked, and is used to re-read configuration at run time, when asked by the user. Set system_config /usr/local/etc/tkpostitrc Set user_config $env(HOME)/.tkpostit These are the pathnames for system-wide and user-wide configuration files. The cfg files are tcl sources, which can override any following setting. Set canvas_width 66 Set canvas_height 66 Set canvas_bitmap /usr/local/tools/lib/tkpostit.bm Set canvas_x_pos "11 33 55" Set canvas_y_pos "11 33 55" The main window in a mesh of bitmaps, and these 5 settings detail how to prepare the mesh. The provided bitmap is 22x22 and is laid out in a 3x3 mesh. Set data_dir $env(HOME)/.tkNotes This is the directory where tkpostit will load and save your notes, their backups, its own geometry and, in the future, other data. Set data_file_mode 640 The notes undergo a chmod command, and this is the used mode Set remember_geometry 1 This is a boolean value, telling whether tkpostit should place itself in the same position as it was at the previous invocation. Set backups_allowed 2 Set initial_delay 20000 Set incremental_delay 2000 You can choose between 0 and 3 backup copies for your notes. The backups are created some seconds after tkpostit is run, and the two delay vlaues are expressed in milliseconds Set save_on_modified 1 This boolean value tells wether to save the note anytime you modify it (it saves aa soon as the pointer leaves the note). However, a few percent of cahnges are lost. Set save_regularly 30 The number is the delay in minutes between two auto-saving events. Zero means 'no auto-save'. Set keep_destroyed 0 You can choose to keep a backup of a note when you destroy it, or even two backups (at two successive destructions). Zero means that when destroyed it is lost forever. Set text_init_width 20 Set text_init_height 10 Set text_wrap_mode word Set scrollbar_side right Set scrollbar_padx 0 This set of options configures the text widget. Though, scrollbar_padx works only when the scrollbar is on the left. Set frame_border 4 Set frame_relief groove Set entry_relief groove Set destroy_relief raised Set save_relief raised This tkostit-1.0 vestige is not so useful, and it will be enhanced as 1.3 is out. Set entry_wid 16 This tells the entry widget how long is its frame, in characters. Set emacs_bindings 1 A boolean value telling if you want emacs-like keybindings to be applied on your text. If zero tk bindings will remain. (The set of bindings is quite poor, and contributions are welcome). Set verbose_mode 0 Verbose mode is a debugging facility, and enables messages as files are saved to disk. Bind main:<1> "MkNewWin new" Bind main:<2> "MkMenu main %X %Y" Bind main:<3> "ChangeState iconify" Bind main: "SaveAllNotes; exit" Bind main: "MkMenu main %X %Y" Bind main: "exit" These are the bindings associated to the main window of tkpostit. You can add any binding you like, or change these, provided you follow the same syntax. Bind note: "MkMenu window %X %Y" Bind note: "MkMenu sleep %X %Y" Bind note: "MkMenu eval %X %Y" Bind note: "MkMenu main %X %Y" As before, these are the bindings on the text widget. You can add or change. Menu main { { "tkPostit-1.1" "" } { "" "" } { "save all" SaveAllNotes } { "withdraw all" "ChangeState withdraw" } { "iconify all" "ChangeState iconify"} { "show all" "ChangeState deiconify" } { "quit" "SaveAllNotes; exit" } { "restart" Restart } } This is the main menu. You can add new menus or change or override proposed menus. The menu is a list of lists, where the first item in each sublist is the string to print out, while the second is the command to execute. Other default menus are note copied here, since you can look at tkpostit itself. 7.2 Builtin Procedures ---------------------- The following is a description of builtin procedures, but you can add your own by writing tcl code in your cfg file. The description provided here is quite terse, since the best source of info is code itself. BaseName Returns the name of the toplevel embedding widget_name. MkNewName Changes the name of the toplevel embedding widget. MkNewWin Creates a new note. If name is 'new' a new note is created, otherwise, a file is loaded. Save Save the note on file. name must be the same form as "note3" and the note must already exist. SaveAllNotes This takes no arguments, and save all the notes. ChangeState ["me"] Used to 'iconify', 'deiconify' or 'withdraw'. If "me" is specified it acts only on the current note, otherwise all notes are acted upon. Deatroy Destroy a note, but ask the user first. name must be the same form as "note0". RemoveFile Removes a note file and, if chosen, keeps backups. Refer to code. MkMenu This posts a menu. name must be the name of a menu configured into tkpostit, as explained in section 7.1. x_pos and y_pos are the position where to put it, and usually are %X and %Y from an event binding. MkBackup Makes backups, if you have chosen to. MkSleeper Forces the current note to be withdrawn, and to pop up after the specified time. MkEval This executes the told program, and places its output at the insertion cursor in teh current note. Restart Causes tkpostit to reread its wholde configuration, like you killed and restarted it. 8. Suggested modifications to your .vtwmrc -------------------------------- NailedDown { "tkpostit" "tkNote" } IconifyByUnMapping { "tkNote"} NoTitle { "tkpostit" } 9. Bug reports and suggestions ------------------------------ rubini@ipvvis.unipv.it 10. Acnowledgements ------------------- All the relevant coding has been made by John Ousterhout and the UCB. I have only played with the toy they let me steal. 'what follows is here to please nroff .fi