Next Previous Contents

## 2. The File Browser Window

The file browser window is the largest window when TkDesk is started for the first time. It contains a menu bar, a configurable button bar (for fast access to the most often used file operations and other functions), an entry field (displaying the current path), a horizontal scrollbar, a certain number of file listboxes (three by default), and a status and information bar.

## 2.1 The Menu Bar

The following sections describe the entries of the individual menus of the file browser windows.

### TkDesk Menu

The "TkDesk" menu contains the following entries:

New Browser...

  Asks for a directory for which to open a new file browser window. If the directory is the empty string, the operation is cancelled. By default the checkbox "In Browser" is checked, but if you uncheck it a file list window will be opened instead. The button to the right of the text entry field gives access to a menu containing previously visited directories.

Clone Window

  Creates a new file browser window with the same directory as the current one (that is, the directory of the file browser from which this menu entry was invoked).

Display AppBar/Hide AppBar

  Opens the application bar if it had been closed before, or hides (closes) it otherwise. This menu entry's label changes based on whether the AppBar is currently displayed or not.

Configuration

  This is a submenu from which individual or all configuration files of TkDesk can be opened to modify them.

Auto Save

  Here you can select which parts of TkDesk are automatically saved periodically and when TkDesk exits.

Save All Now

  Saves all parts of TkDesk's configuration no matter what the settings in the previous submenu.

Close Window

  Closes the file browser window.

Quit

  Quits TkDesk.

### File Menu

This menu provides all the usual file operations plus entries for finding files. The contained menu entries are:

Information

  Opens a file information window for each currently selected file. This window, which can also be used to add annotations to files, is described in section File Information.

New File...

  Asks for the name of a file which will be created in the current directory of the file browser or list. If "Open in Editor" is checked the new file will automatically be opened in the configured editor.

New Directory...

  Asks for the name of a directory which will be created in the current directory of the file browser or list. If "Open after Creation" is checked the current window will switch to the new directory after it is created.

Open

  Opens the selected files using their default action, which corresponds to the first action defined in their popup menus as configured in the "Popups" configuration file.

Print...

  Asks for a command to print the currently selected files. The names of the selected files will be appended to the command. The default command can be defined in the configuration file "System".

Copy, Move, Link...

  Opens a dialog box for copying, moving, linking, symbolic linking etc. of files. This dialog window is described in more detail in section Copying, Moving and Deleting Files.

Rename...

  For each selected file, TkDesk asks for a new name. Before actually renaming TkDesk checks for an existing file with the same name.

Delete...

  Opens a dialog to delete files. The section Copying, Moving and Deleting Files gives more details.

Find Files...

  Opens a dialog window which can be used to search for files, using a variety of characteristics. This dialog is described in more detail in section Finding Files.

Find Annotation...

  Lets you search for files with a certain annotation. More details in section Finding Files.

Copy To X Selection

  Copies the complete names of all currently selected files (i.e. including their paths) to the X clipboard. They can then be pasted into any other X application using the middle mouse button.

Copy Names Only

  Same as previous one, but copies only the files' names (i.e. not their paths.)

History

  Displays a submenu containing recently opened files.

Close Window

  Closes the window.

### Directory Menu

The main purpose of this menu is to select directories which are to be opened. It also manages TkDesk's trash can. The menu contains the following entries:

Open...

  Asks for a directory. A new file list or file browser window will be created, baesed on the setting of the "In Browser" checkbutton.

New...

  Asks for the name of a directory which will be created in the current directory of the file browser or list.

Home Directory

  Changes the directory of the window from which this entry is invoked to the user's home directory.

A number of path entries

  These can be configured in the configuration file `Directories`. See section Configuration of TkDesk for details on how to do this. If one of these menu entries is invoked, the path of the file browser will change to that directory. If such an entry is invoked while at the same time pressing the "Control" key, a new file list window will be created (if the option "Always In Browser" is selected a file browser window will be created), displaying the contents of the selected directory. This feature applies to all menus that contain directory names!

Trees

  Contains two cascaded submenus: "Home" and "Root". The contents of these submenus is dynamically generated and corresponds to the directory hierarchy rooted either at the user's home directory or at "/". Selecting an entry from these submenus changes the directory of the window to the selected directory. Pressing `Control` at the same time opens a new window with this directory.

Open Trash Can

  Opens a file list window displaying the contents of the trash can. When this window is iconified and TkDesk uses icon windows the icon can be used as a Mac-like trash can.

Empty Trash Can

  Empties the trash can after confirmation from the user. This erases the files contained in the trash can for good!

History

  Displays a submenu containing recently opened directories.

### Commands Menu

This menu provides entries to execute commands either once or periodically, edit files, and provides some very basic form of "job control". Its entries are:

Execute...

  Asks for a command to execute. The button to the right of the command entry contains a history of previously executed commands. Selecting one of these copies its name to the entry widget. Checking the "View Output" button will open an editor window after the command completed displaying its output (stdout and stderr).

Execute as root...

  The same as the previous entry but TkDesk will ask you for the root password before executing the command. The command will then run under root permission.

Periodic Execution...

  Opens a window which can be used to execute a command and watch its output periodically. If the "Don't execute" checkbutton is selected, the execution is paused.

Job Control

  Opens a window which allows to stop, terminate, kill etc. processes which have been started by TkDesk.

Environment...

  Opens the "Edit Environment" dialog which can be used to display and modify TkDesk's environment variables. Programs and commands started from TkDesk after any modification in this dialog has been made will pick up the modified environment.

Edit File...

  Asks for the name of a file to edit, and opens it in the editor you selected in the "System" configuration file (defaults to the built-in editor). The "Browse..." button opens a file selector from which a file may be selected.

New File

  Opens a new blank editor window.

Edit Selected

  Opens all currently selected files in one new editor window.

Buffers

  Displays a submenu of all current editor buffers (both files and command output).

A number of custom command entries

  These can be defined in the configuration file `Commands`. See section Configuration of TkDesk for details on how to do this. If one of these menu entries is invoked, the corresponding command will be executed.

History

  Displays a submenu containing commands recently executed.

### Bookmarks Menu

This menu lets you create bookmarks for often used files and directories. To do this, select at least one file/directory and invoke the "Add Bookmark" menu entry. The name(s) of the selected files and directories will now appear alphabetically sorted in the "Bookmarks" menu. You can remove any bookmark from the menu by selecting its corresponding entry from the "Remove Bookmark" submenu.

The bookmarks you add will be automatically saved, if the "Bookmarks" entry of the "Auto Save" submenu contained in the "TkDesk" menu is selected (which is the default).

### Options Menu

The `Options` menu lets you configure many aspects of TkDesk "on the fly". The entries are:

Long Listing

  Select this to let the details of all files and directories be displayed in the file listboxes. This slightly decreases performance and for that reason is switched off by default.

Show All Files

  Whether to show files in the file lists whose name start with ".".

Add Icons

  If selected, small icons will be displayed to the left of the file names in the file listboxes. Turn this off for faster scrolling.

Folders On Top

  If selected (default) folders will always appear on top of the file lists.

Append Type Char

  Whether to append a file-type specific character to the file names. This is mainly intended for monochrome displays and is then automatically selected.

Single Click (Dirs)

  Lets you open directories with a single click of the left mouse button. Individual directories can still be selected by pressing `Control` at the same time.

Always In Browser

  If this option is selected, the "In Browser" checkbutton of the "Open Directory" dialog will always be selected. `Control-Doubleclick` on a directory will open a file browser instead of a file list window.

Status in List Windows

  Whether the singly columned file list windows should have a status bar as well.

Sort by ...

  Sort all file listboxes by one of these criteria: Name, Name (fold, meaning that upper and lower case characters will be "folded", i.e. disregard case when sorting), Size, Date, Extension, or Don't Sort to display directory entries as they are read from disk.

Strip <your home directory>

  If this is selected, and the current path of the browser is somewhere under your home directory, the leftmost file listbox will contain your home directory rather than the root directory. This speeds up the display of directory hierarchies under your home directory.

Overwrite Always

  If this option is selected, TkDesk won't ask if the destination file already exists when copying or moving files.

Really Delete

  Relates to the deletion of files. If this option is selected, the "Delete Files" dialog box will always have the "Delete permanently" checkbutton selected by default.

Quick Drag'n'Drop

  Normally when you drop files onto a file list, the copy dialog appears. If this option is selected, dropped files will be moved to the destination directory without further questions. If `Control` is pressed during dropping, the files will be copied. If the drop target is the trash can, TkDesk will ask if the files are to be deleted "really".

Sort History

  This option determines whether the history menus are to be sorted alphabetically or not.

TkDesk Server

  Start or stop the built-in server to remote execute TkDesk commands. See also section Using the TkDesk Server.

Dialogs at Pointer

  If selected, TkDesk will always try to place new windows right under the mouse pointer.

Autoraise AppBar

  Whether to raise the AppBar above any obscuring window when it is entered by the mouse pointer.

Use Sound

  If you have sound working with TkDesk on your machine, you can temporarily disable sound by selecting this option. Handy when playing Audio CDROMs, for instance.

Number Of Listboxes

  This relates to the number of listboxes in the file browser window. Between 1 and 6 can be displayed, though 18 would theoratically not be a problem.

Balloon Help

  Whether to display a small window at the mouse pointer if it is placed over part of TkDesk, e.g. an AppBar button.

Use Netscape for Help

  Whether to use Netscape rather than the built-in help viewer for displaying TkDesk online help.

The settings of these options are by default automatically saved to `~/.tkdesk/_options`. This can be disabled by deselecting the "Options" entry of the "TkDesk/Auto Save" submenu.

### Help Menu

This menu tries to give you some help with using TkDesk. It also contains entries for displaying the list of FAQs, recently made changes to TkDesk, and the license for using and distributing TkDesk:

User's Guide

  Displays the TkDesk User's Guide either in the built-in help viewer or using Netscape (see previous section).

Manual Page...

  Asks for a command for which to display the system's manual page in an editor window.

Getting Started

  Displays the "Getting Started" guide.

TkDesk FAQ

  Jumps directly to the FAQ section of the TkDesk help volume.

Changes

  Displays recent changes to TkDesk. Make sure you invoke this entry after upgrading to a newer version of TkDesk.

License

  Restates that TkDesk is distributed under the GNU Public License (GPL).

About TkDesk...

  Some info about TkDesk (version, author etc.), plus a link to the TkDesk web page.

## 2.2 The Button Bar

The button bar that's located right underneath the menu bar allows for fast access to any of the commands of TkDesk. It's also possible to configure each button individually to run customized Tcl scripts, that e.g. work on the currently selected files. By default, the buttons in the button bar provide access to the more often used functions of TkDesk (copy, create, delete etc.). When you place the mouse button over any of these buttons, a small help window will appear telling you what this button does (provided the "Balloon Help" option is activated).

The contents of this button bar can be defined via the configuration file `ButtonBar`. See section Configuration of TkDesk and the configuration file itself for details on how to do this. Note that by not defining the variable `tkdesk(button_bar)` in that file or by not defining `tkdesk(small_button_bar)` the button for file viewer or list windows may be surpressed respectively.

## 2.3 The Path Entry

This entry field displays the current path of the file browser or file list. You can also type directly into this field to change the display to another directory. There is a sort of "auto-completion" available; if you type only the first part of a directory's name and press `Control-Tab`, its name will be automatically completed as far as there's no ambiguity.

If you click the right mouse button over this field a popup menu appears which lets you select any of the current directory's parent directories and their subdirectories. You can also open files directly from this popup menu.

The button to the right of the entry field contains a menu of the last 30 (default value this may be changed in the "System" configuration file) directories you have visited. If you select one of these, the current path of the browser will change to it. The "Control-trick" to open the selected path in a new list window that's been described in section Directories works here as well!

## 2.4 The File Listboxes

The main part of the file browser and list windows is taken up by the file listboxes. Directories are by default displayed in blue with a bold font, executable files in red and bold, and regular files in black and a medium font. These settings as well as the color, font and icons used for individual file types may be configured via the `FileTags` configuration file. See section Configuration of TkDesk for details on how to do this.

Right above each listbox the name of the directory whose contents it shows is displayed, together with the current file mask settings. Clicking on this label reveals a menu with the following entries:

Refresh

  Refreshes the listbox contents. Although TkDesk refreshes all its file lists every 5 seconds (default), sometimes you may want to have a file listbox instantaneously updated.

Set Mask...

  Sets a mask for this listbox's display. For example, you can configure the listbox to only display or select files matching the pattern `*.gif`. Multiple masks separated by spaces may be entered to display files matching any of these. A history menu button for reusing masks previously entered is also provided, as well as a checkbutton for inverting the mask's effect (i.e. only files not matching the given mask will be displayed).

No Mask

  Removes a previously activated file mask.

Disk Usage

  Calculates the directory's disk usage, i.e. the number of kilobytes (default) occupied by that directory and all its subdirectories. A window will appear when the calculation is complete, containing a sorted list of all subdirectories and their individual disk usages. If you double-click on any of its entries, a new file list window will appear displaying the directory's contents. Clicking the right mouse button over any of the directories displays its associated popup menu.

Free Space

  Displays the space available in the file system of this listbox's directory, using TkDesk's "Periodic Execution" window.

Execute here...

  Asks for a command to execute in the directory displayed by this listbox. All the usual TkDesk %-sequences to work with the names of selected files may be used, e.g. `%A` to pass all currently selected files to the command.

Execute as root...

  The same as the previous one, except the command will be run under root permission after asking you for the root password (and you entered the correct one...).

Long Listing

  Instead of just the file names displays a "long listing" i.e. a listing containing all the details such as size, permission bits, date and time of last modification etc.

Show All Files

  Whether to display files starting with a dot (".") or not.

Inverse Order

  Whether to invert the current sorting order.

Sort by...

  This is identical to the entry of the same name in the menu bar's "Options" menu, but affects this single listbox only.

Open List Window

  If this listbox is part of a file browser window, open a new list window displaying this listbox's directory.

Open Browser

  Else, open a browser with this directory.

This menubutton can also be used to drag and drop files, as well as to drag the directory displayed in the associated listbox to another target, e.g. the root window by pressing the middle mouse button over the listbox title menu button.

### Handling of the Listboxes (Bindings)

The handling of the file browser windows is very similar to that of the NeXT file manager: when you double click on a directory, the listbox to the right of the current one will display this directory's contents. You can open a directory in this listbox, and the listbox to the right of this one will display its contents. This way you can browse through complete directory hierarchies, while having instant access to the contents of the complete directory tree. When the number of opened directories exceeds the number of visible listboxes, you can scroll the listboxes with the horizontal scrollbar which is located right above the file listboxes.

Files are selected in the file listboxes using the left mouse button. A single click selects a single file, deselecting all other files. If the Control key is pressed simultaneously, the old selection will be retained. By dragging the mouse pointer over a file list, while at the same time pressing the left mouse button, a set of files can be selected. Shift-doubleclick selects all files in that file list. Holding down the shift button extends the current selection unto that file (a.k.a. "range-selection").

Note that if the option "Single Click (Dirs)" is set in the "Options" menu a single click on a directory will suffice open it. In this case you need to use Control-Click to select a single directory.

A double click on any listbox item performs its default action. For directories this is to open it, for executables this is to execute it, and for files it invokes the first entry of the corresponding popup menu as defined in the "Popups" configuration file (see below). If the Control key is pressed while double-clicking a directory, a new file list or file browser window (depending on the setting of the "Always In Browser" option) is created displaying the contents of that directory. For files, a dialog box will appear asking for a command to execute on that file.

Files can be dragged by pressing the middle mouse button over any selected file. If no file is selected, the clicked-over file will be selected. Files can be dropped by releasing the mouse button over any other file listbox and the menubutton above them, over windows of the built-in editor, over the application bar (if the corresponding button has been configured to handle dropped files), over iconified file browsers and file lists and in general over any other application supporting the `file` protocol of the BLT package's drag and drop implementation. Valid drop targets can be identified by looking at the window that is displayed while files are dragged: the window's relief appears raised if over a valid target, flat if not.

The right mouse button is used in the file listboxes to access the file-specific popup menu. Every popup menu contains a submenu, labeled with the file's name, which contains entries for the most common file operations. The remaining entries of the menu can be configured via the configuration file `Popups`. See section Configuration of TkDesk for details on how to do this.

The file listboxes may also be fully controlled using the keyboard:

Up-/Down Arrow

  Move the selection one file up/down.

Page Up/Down

  Move the selection one page up/down.

Home/End

  Move the selection to first/last item in the listbox.

A-Z

  Select the first file matching the character pressed, cycle through subsequent matches on repeated pressing of the same key.

Return

  Open selected file.

Menu (the key left to the right Control key on W95 keyboards)

  Display the currently selected file's popup menu, the menu itself may also be operated using Up/Down, Return, and Esc.

Backspace

  Change directory to the parent directory.

F11

  Open the current file listbox's menu.

## 2.5 The Status Bar

The status bar is located at the bottom edge of file browser windows. If "Status in List Windows" is selected in the "Options" menu file list windows will contain a status bar as well.

It displays either

- the current state of TkDesk,
- the amount of free space in the current file system,
- details about the currently selected file, or
- number and total size of currently selected files.

Next Previous Contents