A proven file manager

Workhorse

Article from Issue 253/2021
Author(s):

Worker, a file manager with more than 20 years of development, has evolved into a tested, powerful, and functional tool.

Two-pane file managers have been around for a long time. Classic examples include Norton Commander, Total Commander, DiskMaster, and Directory Opus. Created in the same vein, Worker [1], a two-pane file manager for the X Window System, has been actively developed since 1998. Many of Worker's features were developed to meet practical needs, resulting in a functional file and directory management tool.

You can find Worker as worker or workerfm in the package sources of most common distributions. On Arch Linux and derivatives, the program is available via the Arch User Repository. However, the Worker package found in your distribution's repository may not be the latest 4.9.x version. Using the latest version of the program typically requires some DIY work. Having said this, Worker has only minimal dependencies (see Table 1) and can therefore be compiled on almost any system without too much trouble. After downloading the source code [2] and unpacking it, use the code in Listing 1 to compile Worker

Table 1

Worker Dependencies

Package

Function

gcc

C++ compiler with C++14 support, GCC >= version 4.9 recommended

libX11-devel, libx11-dev

X11 headers and libraries

avfs

Open archives, FTP access, etc.

libdbus-glib-1-dev, dbus-1-glib-devel, udisks, udisks2

Disk access

Optional Dependencies

libmagic-dev, file-devel

Display image previews

xli

Default image viewer can be changed in the config file (see the "Configuration Files" section for more information)

ibxinerama-dev, libXinerama-devel

Improved placement of windows

lua-devel, liblua5.x-dev

Lua scripting

libxft-dev, libXft-devel

Improved font display

Listing 1

Compiling Worker

$ wget http://www.boomerangsworld.de/cms/worker/downloads/worker-VERSION.tar.bz2
$ tar xf worker-VERSION.tar.bz2
$ cd worker-VERSION
$ ./configure && make && make install

Getting Started

When first launched, Worker checks for an existing configuration before opening the main window; an existing configuration can be from an older version of the application. If needed, the start routine will update the configuration (Figure 1).

Figure 1: Worker starts with a small dialog.

At first glance, Worker's structure appears almost classic (Figure 2). The two panes display directories as lists (see the "Display Modes" box); either pane can function as the source or target, with a red status bar denoting the active pane. The file manager functions can be found in the buttons at the bottom of the window and in context menus. Alternatively, you can bind commands to a double-click or call them up via keyboard shortcuts.

Figure 2: Worker's main window displays files in target and source panes, along with status bars and several functions in the buttonbar below.

Display Modes

When you open Worker, the default appearance is Directory mode. To change the display mode, right-click on the status bar. In the dialog that opens, you can also choose from the following display modes:

  • Image Display: Shows graphics instead of lists
  • Information: Provides additional detailed information from the filesystem, such as access rights, owners, and metadata
  • Text Display: Displays the data like in a text editor

Worker's long development history has resulted in a very compact interface. Because Worker is not necessarily intuitive, you need to become acquainted with Worker's controls and technical functions before getting started.

In the red status bar above the current pane, Worker shows the latest information for the directory. The list display in the current pane depends on the display mode and directory contents. To switch between display modes, click on the small triangles in the upper right corner of the status bar.

Worker organizes entries in the lists in tabs, which allows for lightning-fast switching between multiple directories in both the source and target panes. The small plus sign in the upper left corner above a pane opens a new tab. Clicking on one of the active tabs switches to the directory.

The selected directory can be found a second time below the target or source pane, where the tool displays the directory in text form. To the left of this text display, a button with two dots lets you switch to the parent directory. At the bottom of the main window, you will find numerous buttons organized into several groups. These button groups are called a "bank" in Worker jargon. The button banks (see Table 2) control the main functions [3].

Table 2

Worker Button Banks

Bank

Function

1

Basic functions for files and directories

2

Basic functions for archives

3

Special functions for display, as well as for symlinks

4

Basic Git functions

5

Advanced functions for special file types

6

Other functions

You can toggle between the banks with the mouse wheel while mousing over the lower status bar. Alternatively, you can use the left and right mouse buttons. If necessary, add your own functions to the groups. Each button can call either an internal function, a shell command, a shell script, or an arbitrary program.

Worker always applies the selected functions to all currently selected entries, which occasionally leads to situations where several procedures are possible. If this happens, Worker will ask how you want to proceed (Figure 3).

Figure 3: Depending on the situation, Worker asks which function you want to execute.

You always have the option to trigger almost all actions either with the keyboard or the mouse. In addition, you can customize almost all aspects of the software, starting with the buttons and extending to the list panes, the keyboard shortcuts, and menu entries.

Depending on the file type, Worker changes the commands provided for the files. You then execute the command by either double-clicking or pressing the Enter key. To accomplish these tasks, Worker uses a variety of external programs. As a result of Worker's long development history, several outdated or atypical applications have crept in to this program list.

To find out which external programs are available, search the configuration files for the string:

com =

Make sure to include a space before and after the equal sign. For example, Worker relies on Gimp and the ImageMagick tools for image editing; McEdit, Xeditor, LyX, soffice, and others for text editing; and Netscape for browsing.

In some instances, you can make life easier for yourself by resorting to xdg-utils [4] (XDG is a specification developed by freedesktop.org – formerly the X Desktop Group – for interoperability between different desktop environments). XDG commands such as xdg-open let you call the tools already installed on your system that you have preset for opening files of certain type.

If you launch Worker in a terminal window, you will see additional hints there if something unexpected happens – for example, if a function doesn't work as expected.

Basic Functions

Worker was originally designed to handle files and directories in pretty much any way imaginable. You will find the corresponding functions mainly in the button banks below the file panes. Worker organizes the buttons in a grid, again grouping the functions both by row and by column.

At least as useful as the buttons, the keyboard shortcuts, or shortkeys, provide quick access to functions that are repeatedly used (see Table 3). The ShortkeyList function in bank 4 gives you a complete list of defined shortkeys. Many of the combinations used with Worker are based on Midnight Commander.

Table 3

Worker Shortkeys Access

Shortkey

Function

Tab

Activate other list pane

Up arrow/Down arrow

Go to previous/next entry

Left arrow

Move up one directory level

Right arrow

Enter current directory

Home/End

Activate first/last entry

Ins

Toggle activity

+ (number pad)

Select everything in the current tab

- (number pad)

Deselect everything in the current tab

Enter

Perform double-click action

F3

Show current entry

F4

Edit current entry

F5

Copy selected entries

F6

Move selected entries

F7

Create new directory

F8

Delete selected entries

Shift+Alt+O

Open current directory in opposite list pane

Alt+V

Start volume manager

Alt+B

Open/add bookmarks

Alt+L

Manage labels

Alt+N

Sort entries by name

Alt+T

Sort entries by modification times

Ctrl+D

Show bookmark entries

Ctrl+S

Activate name search in current list pane

Ctrl+Space

Open context menu

Ctrl+I

Activate information mode

Ctrl+B

Activate image display mode

Ctrl+V

Activate text display mode

Important (i.e., frequently used) directories can be saved as bookmarks. In addition, you can label selected entries. To create a bookmark, select the current directory with Alt+B or with the Bookmarks button. In the dialog that opens (Figure 4), you can choose between previously defined bookmarks and change directly to the corresponding directory or add the current directory as a new entry.

Figure 4: You can quickly access specific directories with bookmarks.

In addition to the directory bookmarks, you can use labels for files. You will find the label function in the context menu when you right-click on an entry. You can manage labels with bookmarks. When you open bookmarks, you will also see the labels. If you select a label, the program switches directly to the corresponding directory and highlights the labelled file.

Filters and Patterns

To speed up many tasks, you can filter bookmarks and labels. Ctrl+D shows you only the entries with a label in the file list, providing a useful overview even in large directories. If you call this key combination again, Worker will display all the entries again.

Worker offers several ways to control or limit the actual entries displayed in the list. To control how and what Worker displays in the list panes, you use filters and patterns. For example, you may not want to show all files in a directory, such as /etc/, which often contains several hundred files and subdirectories. You can also change the sort order of a column by clicking on the respective column header.

Filters restrict what you see in a list. The Change filter button lets you define a sequence of characters for file names (Figure 5). There are two varieties of filters: permanent and temporary. Change filter lets you create permanent filters, and Find file sets temporary filters.

Figure 5: Filters control what you see in a list.

The method Find file is particularly sophisticated. First, Worker tries to find the entered characters string exactly and incrementally. If this does not result in a hit, a fuzzy search is performed, which allows random characters in between the ones you entered.

In fact, Worker's filter functions go even further: Worker supports the use of Boolean expressions. If a character string starts with an opening parenthesis, the program interprets everything up to the corresponding closing parenthesis as a logical expression. In the documentation [3], expression matching shows how this is done and which arguments the software assigns to which keywords.

Patterns are closely related to filters. They control the selection of files taking into account certain criteria. You can create patterns with the divide key on your keyboard's number pad. By default, you define file name patterns this way (Figure 6), but directories can also be displayed using patterns. In addition, you can apply several patterns in succession to select multiple types of file names.

Figure 6: Patterns limit the files or directories displayed in the list.

Worker recognizes file types based on the file's content. Worker shows the file's MIME type [5] in the Type column. You can also use the MIME type for filtering and patterns [6].

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Pane Bonanza: 4Pane File Manager
  • Liferay CMS

    Liferay is a powerful and easily customizable CMS that is ideal for community collaboration – once you get it configured.

  • Parallel Bash

    You don't need a heavy numeric mystery to benefit from the wonders of parallel processing. This article describes some simple techniques for parallelizing everyday bash scripts.

  • Web-based Office Tools

    A mobile office without a laptop? No problem – a new generation of web applications converts your browser into a word processor or spreadsheet.

  • 4Pane 2.0

    4Pane provides additional confidence in file management in the form of a clever undo function. Advanced users can install supplemental scripts in an instant.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News