felix - a tui file manager written in Rust

crates.io

A tui file manager with vim-like key mapping, written in Rust.

sample gif

While heavliy inspired by the great vifm and trying to implement its pleasant experience in Rust, at the same time this project focuses on the following points:

  • simple and fast
  • easy to configure how to open files

Status

  • Linux : works well
  • MacOS : should work, though some unusual errors may occur
  • Windows: almost unavailable due to file-name encoding error

Installation

Before you do the following, make sure gcc is installed.

from crates.io:

cargo install felix

or from GitHub repository:

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

Usage

command
fxShow items in the current directory.
fx <directory path>Show items in the path. Both relative and absolute available.

Key manual

KeyExplanation
j / Key UpGo up. If the list exceeds max-row, list “scrolls” before the top of the list.
k / Key DownGo down. If the list exceeds max-row, list “scrolls” before the bottom of the list.
h / Key LeftGo to parent directory if exists.
l / Key Right / EnterOpen file or change directory. Commands for execution can be managed in config file.
ggGo to the top.
GGo to the bottom.
ddDelete and yank item (item will go to the trash directory).
yyYank item. If you yanked other item before, its information is replaced by this one.
pPut yanked item(s) in the current directory. If item with same name exists, copied item will be renamed with the suffix “_copied”.
VSwitch to select mode, where you can move cursor to select items.
d (select mode)Delete and yank selected items, and return to normal mode.
y (select mode)Yank selected items, and return to normal mode.
tToggle sort order (by name <-> by modified time). This change remains until the program ends (sort order will be restored as configured).
:Switch to shell mode (experimantal). Type command and press Enter to execute it. You can use any command in the displayed directory, but it may fail to execute the command (e.g. cd doesn’t work for now), and also the display of items may collapse during execution.
cSwitch to rename mode (enter new name and press Enter to rename the item).
/Switch to filter mode (enter keyword and press Enter to go to filtered list).
EscReturn to normal mode.
:eReload the current directory. Useful when something goes wrong in filter mode (e.g. no matches) or shell mode.
:emptyEmpty the trash directory. Please think twice before using this command.
:hShow help.
:q / ZZExit the program.

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

Settings

config file$XDG_CONFIG_HOME/felix/config.toml
trash directory$XDG_CONFIG_HOME/felix/trash

Default config file, which is here, will be created automatically when you launch the program for the first time.

In config.toml, you can set:

  • color of directories, files, and symlinks separatively
  • default key for sorting item list (“Name” or “Time”)
  • how to open files

Command setting

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