Home

Awesome

crates.io arch linux

felix

screenshot

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

For the overview of this app, take a look at this README, especially key manual.
For more detailed document, visit https://kyoheiu.dev/felix.

<a id="new-release"></a>

New release

v2.14.0 (2024-09-29)

Changed

v2.13.0 (2024-04-07)

Added

Changed

fixed

v2.12.1 (2024-02-04)

Fixed

v2.12.0 (2024-01-28)

Added

Changed

Fixed

For more details, see CHANGELOG.md.

<a id="status"></a>

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 and report any problems.

<a id="installation"></a>

Installation

packageinstallation commandnotes
crates.iocargo install felixMinimum Supported rustc Version: 1.74.1
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 this repository

Update Rust if rustc < 1.74.1:

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

<a id="integrations"></a>

Integrations

Exit to last working directory (LWD)

To export your LWD to the calling shell after exiting from fx, add the following to your .bashrc or .zshrc or an equivalent depending on your (POSIX) shell.
Assuming the fx binary can be found in your PATH.

source <(command fx --init)

If this is not set, exiting to LWD will fail and show the error message.

Others

In addition, you can use felix more conveniently by installing these apps:

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

<a id="usage"></a>

Usage

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

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

Options

`--help` | `-h` => Print help.
`--log`  | `-l` => Launch the app, automatically generating a log file in `{data_local_dir}/felix/log`.
`--init`        => Returns a shell script that can be sourced for shell integration.

<a id="key-manual"></a>

Key manual

j / <Down>         :Go down.
k / <Up>           :Go up.
h / <Left>         :Go to the parent directory if exists.
l / <Right> / <CR> :Open item or change directory.
gg                 :Go to the top.
G                  :Go to the bottom.
z<CR>              :Go to the home directory.
z {keyword}<CR>    :Jump to a directory that matches the keyword.
                    (zoxide required)
<C-o>              :Jump backward.
<C-i>              :Jump forward.
i{file name}<CR>   :Create a new empty file.
I{dir name}<CR>    :Create a new empty directory.
o                  :Open item in a new window.
e                  :Unpack archive/compressed file.
dd                 :Delete and yank item.
yy                 :Yank item.
p                  :Put yanked item(s) from register zero
                    in the current directory.
:reg               :Show registers. To hide it, press v.
"ayy               :Yank item to register a.
"add               :Delete and yank item to register a.
"Ayy               :Append item to register a.
"Add               :Delete and append item to register a.
"ap                :Put item(s) from register a.
V (uppercase)      :Switch to the linewise visual mode.
  - y              :In the visual mode, yank selected item(s).
  - d              :In the visual mode, delete and yank selected item(s).
  - "ay            :In the visual mode, yank items to register a.
  - "ad            :In the visual mode, delete and yank items to register a.
  - "Ay            :In the visual mode, append items to register a.
  - "Ad            :In the visual mode, delete and append items to register a.
u                  :Undo put/delete/rename.
<C-r>              :Redo put/delete/rename.
v (lowercase)      :Toggle whether to show the preview.
s                  :Toggle between vertical / horizontal split in the preview mode.
<Alt-j>
 / <Alt-<Down>>    :Scroll down the preview text.
<Alt-k> 
 / <Alt-<Up>>      :Scroll up the preview text.
<BS>               :Toggle whether to show hidden items.
t                  :Toggle the sort order (name <-> modified time).
c                  :Switch to the rename mode.
/{keyword}         :Search items by a keyword.
n                  :Go forward to the item that matches the keyword.
N                  :Go backward to the item that matches the keyword.
:                  :Switch to the command line.
  - <C-r>a         :In the command line, paste item name in register a.
:cd<CR>            :Go to the home directory.
:cd {path}<CR>     :Go to the path.
:e<CR>             :Reload the current directory.
:config<CR>        :Go to the dirctory that contains the config file if exists.
:trash<CR>         :Go to the trash directory.
:empty<CR>         :Empty the trash directory.
:h<CR>             :Show help.
:q<CR>             :Exit.
:{command}         :Execute a command e.g. :zip test *.md
<Esc>              :Return to the normal mode.
ZZ                 :Exit without cd to last working directory
                    (if `match_vim_exit_behavior` is `false`).
ZQ                 :cd into the last working directory and exit
                    (if shell setting is ready and `match_vim_exit_behavior is `false`).

<a id="preview"></a>

Preview feature

By default, text files and directories can be previewed by pressing v.
Install chafa and you can preview images as well.

<a id="configuration"></a>

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. You can find default config file (config.yaml) in this repository.

Both config.yaml and config.yml work from v2.7.0

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(config.yml)
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(config.yml)
  2. $HOME/.config/felix/config.yaml(config.yml)
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(config.yml)
trash directory : $PROFILE\AppData\Local\felix\Trash
log files       : $PROFILE\AppData\Local\felix\log

About Rgb and AnsiValue

You can configure these colors like this:

color:
  dir_fg: LightCyan
  file_fg: !AnsiValue 120
  symlink_fg: LightYellow
  dirty_fg: !Rgb [124, 30, 40]

cf: https://docs.rs/serde_yaml/latest/serde_yaml/#using-serde-derive

For more details, visit https://kyoheiu.dev/felix.