superfile config
You can edit your superfile config file with the following command:
$EDITOR config_pathSetting
Section titled “Setting”Click here for instructions to edit the theme.
-
editor
Section titled “editor”
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.
-
dir_editor
Section titled “dir_editor”
The editor your directories will be opened with (Leave blank to use defaults : vi - Linux, open - macOS, explorer - Windows).
-
auto_check_update
Section titled “auto_check_update”
true => Checks whether updates are needed when you exit superfile (only checks once a day).
false => No checks performed.
-
cd_on_quit
Section titled “cd_on_quit”
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 :
macOS/Linux (bash or fish)
Section titled “macOS/Linux (bash or fish)”Open the file:
$EDITOR ~/.bashrcCopy the following code into the file:
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:
source ~/.bashrcOpen the file:
$EDITOR ~/.config/fish/config.fishIf you suspect your config.fish file is located somewhere else, read the Fish shell documentation
Copy the following code into the file:
function spf set os $(uname -s)
if test "$os" = "Linux" set spf_last_dir "$HOME/.local/state/superfile/lastdir" end
if test "$os" = "Darwin" set spf_last_dir "$HOME/Library/Application Support/superfile/lastdir" end
command spf $argv
if test -f "$spf_last_dir" source "$spf_last_dir" rm -f -- "$spf_last_dir" >> /dev/null endendSave, exit, and reload config.fish:
source ~/.config/fish/config.fishWindows (Powershell)
Section titled “Windows (Powershell)”Open the file:
notepad $PROFILECopy the following code into the file:
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.
. $PROFILE-
default_open_file_preview
Section titled “default_open_file_preview”
true => Shows the file preview window when you run superfile.
false => Hides the file preview window when you run a superfile.
-
show_image_preview
Section titled “show_image_preview”
true => Shows the image preview in file preview panel when an image file is selected.
false => Does not show the image preview.
-
show_panel_footer_info
Section titled “show_panel_footer_info”
true => Shows additional footer info for file panel like panel mode and sort type.
false => Does not show additional footer info for file panel
-
file_size_use_si
Section titled “file_size_use_si”
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).
-
default_directory
Section titled “default_directory”
The default location every time superfile is opened. Supports ~ and .
-
default_sort_type
Section titled “default_sort_type”
File panel sorting type. Directories will always be displayed at the top.
0 => Name
1 => Size
2 => Date Modified
3 => Type
-
sort_order_reversed
Section titled “sort_order_reversed”
File panel sorting order.
false => Ascending (a-z)
true => Descending (z-a)
-
case_sensitive_sort
Section titled “case_sensitive_sort”
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
-
ignore_missing_fields
Section titled “ignore_missing_fields”
Controls whether warnings about missing fields in the config file are displayed.
true => No warnings will be shown when fields are missing from the config file
false => Warnings will be shown for any missing fields in the config file
-
page_scroll_size
Section titled “page_scroll_size”
Number of lines to scroll when using PgUp/PgDown keys.
0 => Full page scroll (default behavior)
n (where n > 0) => Scroll exactly n lines
-
code_previewer
Section titled “code_previewer”
'' => Use the builtin syntax highlighting for code files with chroma.
'bat' => Use syntax highlighting provided by the bat command line tool.
-
nerdfont
Section titled “nerdfont”
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
-
show_select_icons
Section titled “show_select_icons”
true => Show checkbox icons in select mode.
false => Don’t show checkbox icons in select mode.
-
transparent_background
Section titled “transparent_background”
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.
-
file_preview_width
Section titled “file_preview_width”
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
-
sidebar_width
Section titled “sidebar_width”
This setting is an integer.
0 => The sidebar will not display.
X => The width of the sidebar.
-
Border style
Section titled “Border style”
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 = "┤"#...-
open_with
Section titled “open_with”
Allows users to map file extensions to commands used to open them. The file path will be appended as the last argument.
[open_with]xopp = "xournalpp"conf = "nvim"Default superfile config
Section titled “Default superfile config”############################################### ## Superfile Configuration ## ###############################################
# This contains the root config file for superfile! More details can be found at# https://superfile.dev/configure/superfile-config/.
################################################################################ Defaults ################################################################################
#-- File Editor# Default: $EDITOReditor = ""
#-- Directory Editor#dir_editor = ""
#-- Auto check for updateauto_check_update = true
#-- cd on quit# Should we cd the shell to the last directory open in superfile when the# program exits?cd_on_quit = false
#-- File Preview# Should we open a file preview by default whenever selection-hovering over a# file?default_open_file_preview = true
#-- Image Preview# Should we open an image preview by default whenever selection-hovering over an# image?show_image_preview = true
#-- File Info Footer# Should we display a footer in the file panel that provides more file information?show_panel_footer_info = true
#-- Default Directory# The initial path that the file panel should navigate to when superfile is# opened. This setting understands relative paths such as ".", "..", etc.default_directory = "."
#-- File Size Units# true: SI decimal units of 1000 (kB, MB, GB).# false: IEC binary units of 1024 (KiB, MiB, GiB).file_size_use_si = false
#-- Default File Sort Type# (0: Name, 1: Size, 2: Date Modified, 3: Type).default_sort_type = 0
#-- Sort Order Reversing# true: Descending.# false: Ascending.sort_order_reversed = false
#-- Case-Sensitive Sorting (only for Name Sort)# An uppercase "B" comes before a lowercase "a" if true.case_sensitive_sort = false
#-- Exit Shell on Success# Whether to exit the shell on successful command execution.shell_close_on_success = false
#-- Page Scroll Size# Number of lines to scroll for PgUp/PgDown keys (0: full page, default behavior).page_scroll_size = 0
#-- Debug Modedebug = false
#-- Ignore Missing Config Fields# Whether to silence any warnings about missing config fields.ignore_missing_fields = false
################################################################################ Styling ################################################################################
#-- Theme# Put your theme's name here!theme = "catppuccin-mocha"
#-- Code Previewer# Whether to use the builtin syntax highlighting with chroma or use bat. Values: "" for builtin chroma, "bat" for batcode_previewer = ""
#-- Nerd Fonts Support# Whether to enable support for Nerd Fonts symbols.# Requires: Font patched with the Nerd Fonts patch.nerdfont = true
#-- Show checkbox icons in select mode# Requires: nerdfont = trueshow_select_icons = true
#-- Transparent Background Support# Set to true to enable background transparency.# Requires: terminal support for colour transparencytransparent_background = false
#-- File Preview Panel Width# Width of the file preview panel will be 1/n of the total width.# Values recommended to be in 2–10.# Default (0): Use the same width as file picker panel.file_preview_width = 0
#-- Sidebar Width# If you don't want to display the sidebar, you can input 0 directly.# Values recommended to be in 3–20.sidebar_width = 20
#-- Border# Make sure to add strings that are 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 ################################################################################
# This section is for using plugins with superfile, external addons that extend# the default capabilities of the program! More info can be found at# https://superfile.dev/list/plugin-list/.
#-- Detailed Metadata# Requires: exiftoolmetadata = false
#-- MD5 Checksum Generation# Requires: md5sumenable_md5_checksum = false##-- Zoxide Support - Smart directory navigation!# Requires: zoxidezoxide_support = false
#-- File opening rules# Map file extensions to commands used to open them.# The file path will be appended as the last argument.# MUST BE IN THE VERY END OF THE FILE BECAUSE TOML CANNOT CLOSE TABLES# Example:# png = "feh"# pdf = "zathura"# conf = "nvim"[open_with]