Skip to content

superfile config

You can edit your superfile config file with the following command:

Terminal window
$EDITOR config_path

Click here for instructions to edit the theme.

The editor your files will be opened with (Leave blank to use the EDITOR environment variable. If EDITOR environment variable is not set, it will default to nano for MacOS/Linux, and notepad for Windows.

The editor your directories will be opened with (Leave blank to use defaults : vi - Linux, open - MacOS, explorer - Windows).

true => Checks whether updates are needed when you exit superfile (only checks once a day).

false => No checks performed.

true => When you exit superfile, changes the terminal path to the last file panel you used.

false => When you exit superfile, the terminal path remains the same prior to superfile.

After setting to true, you need to update your shell config file. Sample changes :

Open the file:

Terminal window
$EDITOR ~/.bashrc

Copy the following code into the file:

cd_on_quit/cd_on_quit.sh
spf() {
os=$(uname -s)
# Linux
if [[ "$os" == "Linux" ]]; then
export SPF_LAST_DIR="${XDG_STATE_HOME:-$HOME/.local/state}/superfile/lastdir"
fi
# macOS
if [[ "$os" == "Darwin" ]]; then
export SPF_LAST_DIR="$HOME/Library/Application Support/superfile/lastdir"
fi
command spf "$@"
[ ! -f "$SPF_LAST_DIR" ] || {
. "$SPF_LAST_DIR"
rm -f -- "$SPF_LAST_DIR" > /dev/null
}
}

Save, exit, and reload your .bashrc file:

Terminal window
source ~/.bashrc

Open the file:

Terminal window
notepad $PROFILE

Copy the following code into the file:

cd_on_quit/cd_on_quit.ps1
function spf() {
param (
[string[]]$Params
)
$spf_location = [Environment]::GetFolderPath("LocalApplicationData") + "\Programs\superfile\spf.exe"
$SPF_LAST_DIR_PATH = [Environment]::GetFolderPath("LocalApplicationData") + "\superfile\lastdir"
& $spf_location @Params
if (Test-Path $SPF_LAST_DIR_PATH) {
$SPF_LAST_DIR = Get-Content -Path $SPF_LAST_DIR_PATH
Invoke-Expression $SPF_LAST_DIR
Remove-Item -Force $SPF_LAST_DIR_PATH
}
}

Save, exit, and reload your profile.

Terminal window
. $PROFILE

true => Shows the file preview window when you run superfile.

false => Hides the file preview window when you run a superfile.

true => Shows the image preview in file preview panel when an image file is selected.

false => Does not show the image preview.

true => Shows additional footer info for file panel like panel mode and sort type.

false => Does not show additional footer info for file panel

true => Displays the file/directory sizes using powers of 1000 (kB, MB, GB).

false => Displays the file/directory sizes using powers of 1024 (KiB, MiB, GiB).

The default location every time superfile is opened. Supports ~ and .

File panel sorting type. Directories will always be displayed at the top.

0 => Name

1 => Size

2 => Date Modified

3 => Type

File panel sorting order.

false => Ascending (a-z)

true => Descending (z-a)

File panel sorting case sensitivity (if true, uppercase letters come before lowercase letters).

true => Case sensitive (“B” comes before “a”)

false => Case insensitive (“a” comes before “B”)

Whether to enable debug mode. (if true, more verbose logs are written in log file).

true => DEBUG, INFO, WARN, ERROR logs are written to log file

false => INFO, WARN, ERROR logs are written to log file

'' => Use the builtin syntax highlighting for code files with chroma. 'bat' => Use syntax highlighting provided by the bat command line tool.

true => Use nerdfont for directories and file icons.

false => Dont use nerdfont. If you don’t have or don’t want Nerdfont installed you can turn this off

true => The background color is not rendered (transparent). This is useful if your terminal background is transparent.

false => The background is rendered (with color) to maintain theme consistency.

This setting is an integer.

0 => The width of the file preview window is the same as the file panel.

X => The width of the file preview window is 1/X of the terminal width (minus the sidebar width). It is calculated as: (terminal width - sidebar width) / X

This setting is an integer.

0 => The sidebar will not display.

X => The width of the sidebar.

Here are a few suggested styles, of course you can change them to your own:

# ...
border_top = ""
border_bottom = ""
border_left = ""
border_right = ""
border_top_left = ""
border_top_right = ""
border_bottom_left = ""
border_bottom_right = ""
border_middle_left = ""
border_middle_right = ""
#...
# ...
border_top = ""
border_bottom = ""
border_left = ""
border_right = ""
border_top_left = ""
border_top_right = ""
border_bottom_left = ""
border_bottom_right = ""
border_middle_left = ""
border_middle_right = ""
#...
src/superfile_config/config.toml
# More details are at https://superfile.netlify.app/configure/superfile-config/
#
# change your theme
theme = 'catppuccin'
#
# The editor files will be opened with. (Leave blank to use the EDITOR environment variable).
editor = ""
#
# The editor directories will be opened with. (Leave blank to use the default editors).
dir_editor = ""
#
# Auto check for update
auto_check_update = true
#
# Cd on quit (For more details, please check out https://superfile.netlify.app/configure/superfile-config/#cd_on_quit)
cd_on_quit = false
#
# Whether to open file preview automatically every time superfile is opened.
default_open_file_preview = true
#
# Whether to show image preview
show_image_preview = true
#
#
# Whether to hide additional footer info for file panel.
show_panel_footer_info = true
#
# The path of the first file panel when superfile is opened.
default_directory = "."
#
# Display file sizes using powers of 1000 (kB, MB, GB) instead of powers of 1024 (KiB, MiB, GiB).
file_size_use_si = false
#
# Default sort type (0: Name, 1: Size, 2: Date Modified, 3: Type).
default_sort_type = 0
#
# Default sort order (false: Ascending, true: Descending).
sort_order_reversed = false
#
# Case sensitive sort by name (upper "B" comes before lower "a" if true).
case_sensitive_sort = false
#
# Whether to exit the shell on successful command execution.
shell_close_on_success = false
#
# Whether to enable debug mode.
debug = false
#
# ================ Style =================
#
# Whether to use the builtin syntax highlighting with chroma or use bat. Values: "" for builtin chroma, "bat" for bat
code_previewer = ''
#
# If you don't have or don't want Nerdfont installed you can turn this off
nerdfont = true
#
# Set transparent background or not (this only work when your terminal background is transparent)
transparent_background = false
#
# File preview width allow '0' (this mean same as file panel),'x' x must be from 2 to 10 (This means that the width of the file preview will be one xth of the total width.)
file_preview_width = 0
#
# The length of the sidebar. If you don't want to display the sidebar, you can input 0 directly. If you want to display the value, please place it in the range of 3-20.
sidebar_width = 20
#
# Border style
# Make sure to add strings exactly one character wide. Use ' ' for borderless
border_top = ''
border_bottom = ''
border_left = ''
border_right = ''
border_top_left = ''
border_top_right = ''
border_bottom_left = ''
border_bottom_right = ''
border_middle_left = ''
border_middle_right = ''
#
# ==========PLUGINS========== #
#
# Show more detailed metadata, please install exiftool before enabling this plugin!
metadata = false
#
# Enable MD5 checksum generation for files
enable_md5_checksum = false