FileManager: a highly configurable Tcl/Tk File and Session manager

FileManager: a highly configurable Tcl/Tk File and Session manager

G.Schaftenaar, CMBI, the Netherlands

------------------------------


INTRODUCTION

The FileManager is a highly configurable File and Session manager written in Tcl/Tk. Tcl is a powerfull interpreted script language, Tk adds Xwindow graphical interface capability ( Ousterhout, 1994). The FileManager was developed as an independent component of the General Menu System, which is being developed by Harcoh de Hilster, at the CMBI, on a grant from the EMBnet (European Molecular Biology Network). Download here. The external browser can be downloaded Here. When using the internal browser the user has to wait until a file has been read or a command has been executed.


Below is a Clickable Map of the FileManager:


Index:



Sort Types

The sort type controls in what order files/directories are displayed in the file selector.
Three sort types are supported:


List Types

The list type controls what is displayed in the file selector. Two list types are supported:

Dot Files controls whether the . files (Files who's filename starts with a .) are listed or not.
On a Unix system the . files are widely used by applications as configuration files.


User Commands

The FileManager allows the user to define which applications are to be executed from the User Commands menu. These applications are grouped by topic. The Configure section explains how to add new groups and to add new applications to a group. The FileManager comes with two predefined groups, system and Internet Tools.


Directory Hot list

The Filemanager lets you keep a list of Directories you can revisit, the Hotlist. This information is saved in the file .filemanhot in your HOME directory. Add current to Hotlist adds the current directory to the Hotlist. Hotlist pops up the Hotlist window:

To activate a Hotlist directory, select a directory from the listbox by clicking with the mouse and click the button or Double click in the listbox.

You can delete a directory from the Hotlist by select a directory from the listbox and clicking the button.

adds the current directory to the Hotlist.

unmaps the Hotlist window.




Configure

The FileManager lets you define:

These commands can be added,edited and deleted. All three type of commands use the same syntax. Any changes to the definition of these commands, can be made permanent by Clicking the Save Configuration menu item. The configuration is kept in the file .filemanrc in the Users login or HOME You can Download a sample .filemanrc, copy it to your HOME directory and rename it to .filemanrc.

Command Syntax:

The user can either start external applications or use Tcl syntax. The latter has to be declared by using the macro INTERNAL (Use only CAPITALS for macros). The INTERNAL syntax is used by some of the predefined commands, but will not be of much use for the general user. With one exception, you can use the internal Browser to browse the output of external (NON-interactive) commands or to view the contents of a file.

Example: INTERNAL BrowseCmd "zcat OLDFILE"

OLDFILE is an other macro. A macro is one of the below reserved keywords, with usually triggers some action to be performed before the actual execution of the command:


OLDFILE OLDFILE is substituted by the selected filename(s)
OLDFILECHECK OLDFILE is substituted by the selected filename(s), after user confirmation
NEWFILE NEWFILE is substituted by the user supplied filename
NEWDIR NEWDIR is substituted by the user supplied directory name
ADDARGS ADDARGS is substituted by the user supplied argument
UPDATELIST UPDATELIST triggers un update of the FileSelection Box after the execution of a command


Use the & symbol at the end of the command definition to force execution in the background. In this way the FileManager does not have to wait for the external application to finish, before continuing.

Examples:

In the last example the environment variable TA_ROOT is used.





Switching from a small to a big Filemanager


Clicking the button, will let the Filemanager shrink. Only the menubar will be visible:

Clicking the button, will let the Filemanager grow again.

In this way the Filemanager does not permanently take up a lot of space on the screen.


Restricting the number of listed files by a filter

In this text field you can supply a file filter for instance *.ps will only list the files whos filenames end in .ps, these will be PostScript files. Hit Return to activate. A * means all files.
Clicking with the Third mouse button in this field will bring up a popup window which lists the currently defined File Extensions (See the Configure section on how to add new File Extensions.):


A field for displaying the selected filenames

See the FileSelection Box section on how select files.


Changing directory

There are three ways of changing the current directory:


The FileSelection Box

Directories are listed on the top of the list and are denoted with a /. The first entry is always ../ the directory just above the current one. You can go to a directory by Double Clicking it's entry in the list. You can select a file by Clicking it's entry in the list. You can select a range of files by pressing the first mouse button on the first entry, dragging down the pointer to the last entry and finally releasing the mouse button. The selected file(s) will show up in the Filename: field. Double Clicking an ordinary file will trigger the action associated with its file extension. Example: Double Clicking a file with the file extension .ps migth bring up a PostScript previewer. See the Configure section on how to add new File Extensions and how to define the action associated with it.


The Button Box

The above Button Box shows the predefined buttons of the FileManager.
(See the Configure section on how to add your own buttons)


The internal Browser

The FileManager has in internal browser which can be used for browsing through the contents of a file or the output of a command. If the output contains special character attributes, such as Bold or Underlining the characters will be displayed in different colors. Colors and fonts can be configured.

Examples: