crates.io repository


felix

A tui file manager with Vim-like key mapping, written in Rust.
Fast, simple, and easy to configure & use.

sample

New Release

v2.3.0 (2023-05-26)

Changed

v2.2.8 (2023-05-19)

Fixed

For more details, see CHANGELOG.md in the repository.

Get Started

Status

OSStatus
Linuxworks
NetBSDworks
MacOSworks
Windowsnot fully tested yet

For Windows users: From v1.3.0, it can be at least compiled on Windows (see .github/workflows/install_test.yml.) If you’re interested, Please try the native build and report any problems.

Installation

packageinstallation commandnotes
crates.iocargo install felixMinimum Supported rustc Version: 1.65.0
Arch Linuxpacman -S felix-rsThe binary name is felix if you install via pacman. Alias fx='felix' if you want, as this document (and other installations) uses fx.
NetBSDpkgin install felix

From git repository

Update Rust if rustc < 1.65:

rustup update
git clone https://github.com/kyoheiu/felix.git
cd felix
cargo install --path .

Integrations

In addition, you can use felix more conveniently by installing the following two apps:

These apps do not need any configuration to use with felix!

Usage

If you install this app via pacman, the default binary name is felix.

command
fxShow items in the current directory.
fx <directory path>Show items in the path. Both relative and absolute available.
option
-l / --logLaunch the app, automatically generating a log file.
-h / --helpPrint help.

Key Manual

Move cursor / Change directory

KeyExplanation
j / DownGo up. If the list exceeds max-row, it “scrolls” before the top of the list.
k / UpGo down. If the list exceeds max-row, it “scrolls” before the bottom of the list.
h / LeftGo to the parent directory if exists.
l / Right / EnterOpen a file or change the directory. Commands for the execution can be managed in the config file.
ggGo to the top.
GGo to the bottom.
z + EnterGo to the home directory.
z <keyword> + EnterThis command requires zoxide installed. Jump to a directory that matches the keyword. Internally, felix calls zoxide query <keyword>, so if the keyword does not match the zoxide database, this command will fail.
:cd + Enter / :z + EnterGo to the home directory.
:z <keyword> + EnterSame as z <keyword>.
:trash + EnterGo to the trash directory.

Open a file

KeyExplanation
l / Right / EnterOpen a file or change the directory. Commands for the execution can be managed in the config file.
oOpen a file in a new window. This enables you to use felix while working with the file. Works only if exec is set in the config file and the extension of the item matches one of the value.
eExtract archived/compressed file to the current directory. Supported types: tar.gz(Gzip), tar.xz(lzma), tar.zst(Zstandard & tar), zst(Zstandard), tar, zip file format and formats based on it(zip, docx, …).

Manage items

KeyExplanation
ddDelete and yank one item, which will go to the trash directory.
yyYank one item. If you yanked other item(s) before, it’s replaced by this one.
pPut yanked item(s) in the current directory. If the item with same name exists, copied item will be renamed with the suffix \_{count}, such as test_1.txt.
cSwitch to the rename mode (enter the new name and press Enter to rename the item).
VSwitch to the select mode, where you can move cursor to select items.
d (select mode)Delete and yank selected items, and return to the normal mode.
y (select mode)Yank selected items, and return to the normal mode.
uUndo put/delete/rename.
Ctrl + rRedo put/delete/rename.

Change the view, search and others

KeyExplanation
vToggle whether to show the item preview (text, image, or the contents tree) on the right half of the terminal. You must install chafa in order to preview images.
Alt + j / DownScroll down the preview text.
Alt + k / UpScroll up the preview text.
sToggle between vertical / horizontal split in the preview mode.
backspaceToggle whether to show hidden items or not. This change remains after exit (stored in .session).
tToggle sort order (by name <-> by modified time). This change remains after exit (same as above).
/Search items by the keyword.
nGo forward to the item that matches the keyword.
NGo backward to the item that matches the keyword.
:Switch to the shell mode. Type command and press Enter to execute it. You can use any command in the displayed directory, but some commands may fail, and the display may collapse during execution.
:e + EnterReload the current directory. Useful when something goes wrong.
:empty + EnterEmpty the trash directory. Please think twice to use this.
:h + EnterShow help. (scrolls by j/k or Up/Down)
EscReturn to the normal mode.
:q + Enter / ZZExit.

Note that items moved to the trash directory are prefixed with Unix time (like 1633843993) to avoid the name conflict. This prefix will be removed when put.

Configuration

Config file

If any config file is not found, or found one is broken, felix launches with the default configuration, without creating new one. Note that the default editor is $EDITOR, so if you’ve not set it, opening a file will fail.

Trash directory and log file

Contrary to the config file, these directory and file will be automatically created.

Linux

config file     : $XDG_CONFIG_HOME/felix/config.yaml
trash directory : $XDG_DATA_HOME/felix/Trash
log files       : $XDG_DATA_HOME/felix/log

macOS

On macOS, felix looks for the config file in the following locations:

  1. $HOME/Library/Application Support/felix/config.yaml
  2. $HOME/.config/felix/config.yaml
trash directory : $HOME/Library/Application Support/felix/Trash
log files       : $HOME/Library/Application Support/felix/log

Windows

config file     : $PROFILE\AppData\Roaming\felix\config.yaml
trash directory : $PROFILE\AppData\Local\felix\Trash
log files       : $PROFILE\AppData\Local\felix\log

Default config

# (Optional)
# Default exec command when opening file.
# If not set, will default to $EDITOR.
# default: nvim

# (Optional)
# key (the command you want to use when opening file): [values] (extensions)
# In the key, You can use arguments.
# exec:
#   zathura:
#     [pdf]
#  'feh -.':
#   [jpg, jpeg, png, gif, svg, hdr]

# (Optional)
# Whether to use syntax highlighting in the preview mode.
# If not set, will default to false.
# syntax_highlight: true

# (Optional)
# Default theme for syntax highlighting.
# Pick one from the following:
#    Base16OceanDark
#    Base16EightiesDark
#    Base16MochaDark
#    Base16OceanLight
#    InspiredGitHub
#    SolarizedDark
#    SolarizedLight
# If not set, will default to "Base16OceanDark".
# default_theme: Base16EightiesDark

# (Optional)
# Path to .tmtheme file for the syntax highlighting.
# If not set, default_theme will be used.
# theme_path: "/home/kyohei/.config/felix/monokai.tmtheme"

# The foreground color of directory, file and symlink.
# Pick one of the following:
#     Black            // 0
#     Red              // 1
#     Green            // 2
#     Yellow           // 3
#     Blue             // 4
#     Magenta          // 5
#     Cyan             // 6
#     White            // 7
#     LightBlack       // 8
#     LightRed         // 9
#     LightGreen       // 10
#     LightYellow      // 11
#     LightBlue        // 12
#     LightMagenta     // 13
#     LightCyan        // 14
#     LightWhite       // 15
#     Rgb(u8, u8, u8)
#     AnsiValue(u8)
# For more details, see https://docs.rs/termion/1.5.6/termion/color/index.html
color:
  dir_fg: LightCyan
  file_fg: LightWhite
  symlink_fg: LightYellow

Command settings

For example, If you write

default: nvim

exec:
  'feh -.':
    [jpg, jpeg, png, gif, svg]
  zathura:
    [pdf]

then, .jpg, .jpeg, .png, .gif and .svg files are opened by feh -. <file-name>, .pdf files by zathura <file-name> and others by nvim <file-name> .