Skip to content

Superfile config

You can enter the following command to set it up;

Terminal window
$EDITOR config_path

Setting

  • theme

You can go to here to know how to config it

  • editor

The editor files/directories will be opened with. (leave blank to use the EDITOR environment variable).

  • auto_check_update

true => Turning on will check whether updates are needed every time superfile is closed (only checked once a day)

false => If closed, no checks will be performed

  • cd_on_quit

true => Every time you exit superfile, it will navigate the path of the terminal to the path of the last file panel you used.

false => Nothing happen

If you want to open this feature you need to copy the code into ~/.bashrc

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
}
}

and reload ~/.bashrc

Terminal window
source ~/.bashrc
  • default_open_file_preview

true => The file preview panel opens automatically every time you open superfile.

false => The file preview panel will not open automatically when you open a superfile.

  • file_size_use_si

true => The file/directory sizes will be displayed using powers of 1000 (kB, MB, GB).

false => The file/directory sizes will be displayed using powers of 1024 (KiB, MiB, GiB).

Style

  • transparent_background

true => If enabled, the background color will not be rendered (transparent). This is useful if your terminal background is transparent.

false => If turned off, the background will be rendered (with color) to maintain theme consistency.

  • default_directory

The default location every time superfile is opened, supports ~ and .

  • file_preview_width

This setting is an integer.

0 => When it is 0, it means that the width of the File preview panel will be the same as that of the File panel.

X => When it is any other number, it means that the width of the File preview panel will be the width of the entire panel (total width of the terminal - width of the sidebar) divided by X.

This setting is an integer.

0 => If the number is 0 then the sidebar will not display.

X => This number will be the width of the sidebar width.

  • 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 = ""
#...

Default superfile config

src/superfile_config/config.toml
# More details are at https://superfile.netlify.app/configure/superfile-config/
#
# change your theme
theme = 'catppuccin'
#
# The editor files/directories will be opened with. (leave blank to use the EDITOR environment variable).
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
#
# The path of the first file panel when superfile is opened. (DON'T USE '~')
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
#
# ================ Style =================
#
# 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 less than 10 and greater than 1 (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
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