Configuration

Getting started

Default configuration

A deafult configuration is provided with the application. You don’t need to change it unless you explicitly need to change some of the apsects desribed below.

The application may write to the configuration file (e.g., when you change the settings within the application itself), but will preserve other content and formatting.

Configuration file

Location

You configuration file location depends on your OS. To navigate to it, use the “Show the configuration directory” command from the Command Palette (Ctrl+p).

Syntax

Configuration file syntax is admittedly complex. Future versions of F2 Commander will have a different configuration file syntax. The change won’t be backward-compatible.

Configuration file is a simple list of key-value pairs, similar to how variables are declared in Bash. The syntax is that of .env files. Allowed are text values containing Python primitives: 'strings', numbers (including but not limited to 42), boolean True and False (capitalized), and collections of these values: lists [] and dicts {}. All values should be quoted.

Bookmarks

Bookmarks can be defined under the bookmarks key as a list of paths. Every path and the value itself must be quoted. For example:

bookmarks = "[
  '~',
  '~/Documents',
  '~/Downloads',
  '~/Pictures',
  '~/Videos',
  '~/Music',
]"

By default, bookmarks are set to the typical desktop locations, similar to the example.

Remote file systems

Connection configuration for remote file systems can be persisted and accessed from the “Bookmarks” dialog.

Connection configuration is defined under file_systems key, as a list of connection objects. Every connection object is a set of key-value pairs, with following keys:

  • 'display_name': a title that will be shown in the bookmarks list
  • 'protocol': a name of the protocol recognized by fsspec
  • other keys are considered to be fsspec storage_options

Refer to the documentation of the installed additional packages for more information about the remote file system configuration.

For example, to connect to an ADLS Gen2 storage account:

file_systems = "[
  {'display_name': 'My BLOB storage', 'protocol': 'abfs', 'account_name': 'myaccount', 'account_key': 'mykey'},
]"

To connect to a remote file system you may need to install additional packages that provide fsspec implementations for the desired protocol. To find the name of the package, if it is missing, use the “Connect” dialog (Ctrl+t).

For example, if you installed F2 Commander with pipx, and you want to connect to an S3 bucket, you need to install the s3fs package:

pipx inject f2-commander s3fs

Remote bookmarks are in “alpha” version, exposing the underlying connector configuration in a very generic way. Refer to the documentation of the installed additional packages for more information.

Color themes

To change a color theme, select “Change theme” from the Command Palette.

Themes are built-in and are currently not customizable.