Worker file manager

1. External Virtual Dir

The "External Virtual Dir" command can be used to create a virtual directory containing files from output of external program. This allows for dynamic content of Worker panels. Examples are the list of modified files in a git repository, or even the output of the find command with specific matching rules.

The command is configured when adding it to the command list of a button, hotkey, or file type action. The configuration dialog allows to enter the program to execute, optionally adding any flags from the Own command. The command is executed in the current directory.

The output of the external program is used to create a new tab with a virtual directory that contains each output line as an individual directory entry. This can be a file or a directory, but only elements that actually exists are added to the virtual directory. Relative paths are considered relative to the current directory while absolute paths are taken as is.

1.1. Examples

1.1.1. Modified files in a git repo

The default config comes with an example button which uses the output of the command
git status --porcelain -uno | cut -c4-
to list all files in a git repository that are modified.

The script executed by the corresponding button can be found in the "scripts" directory.

1.1.2. Files matching a checksum

This example script lists all files in a virtual directory which matches an entered checksum.

The button "find files by chksum" in the default config asks for a checksum (which can be a prefix of the complete checksum) and an optional file size limit. All files matching the checksum will be shown in a new virtual directory.

The corresponding script is a python script which can be find in the "scripts" directory.

1.1.3. Files from a separate file

Another useful example is to store specific file names into text files, one entry per line, and use a file type to automatically enter the virtual directory containing the files listed in that file.

You can import the file worker-vdir.conf (0 kB) into the Worker config and create a text file ending with .wvdir. This file could look like this:

README
/etc/os-release
some/other/file

Worker will recognize this file as "Worker VDIR" and you can press Enter on that file to enter the virtual directory.

This is useful if you often want to access the same set of files for some project. Just put them in one file and you can access them directly no matter where those files are located.