Skip to content

joachimschmidt557/nimmm

Repository files navigation

nimmm

Build GitHub

A terminal file manager written in nim inspired by the awesome nnn.

asciicast

The goal of nimmm is not to replace nnn; I just wanted to code my own version of nnn to my liking. nimmm does not nearly have the same amount of features and power than nnn but it has enough features to be usable as a daily driver for me.

Table of Contents

  1. Features
  2. Installation
    1. From source
    2. With nimble
    3. With Nix
  3. Usage
    1. Configuration
    2. Default keymap
  4. ToDo
  5. Dependencies
    1. Compile-time
    2. Run-time

Features

  • Support for all plaforms where nim and termbox can be installed on
  • Colorizing with LS_COLORS
  • Custom keymaps (see below)
  • Simple selection mechanism
  • Incremental search

Installation

From source

$ git clone https://github.com/joachimschmidt557/nimmm
$ cd nimmm
$ nimble build --threads:on

With nimble

$ nimble install nimmm

With Nix

$ nix-env -i nimmm

Usage

Configuration

Some functionality of nimmm is controlled via environment variables similar to other programs:

Environment variable Setting
EDITOR file editor
PAGER file viewer
NIMMM_OPEN file opener
NIMMM_256 enable 256 color mode

Other configuration such as keybindings are configured in $XDG_CONFIG_HOME/nimmm.conf where $XDG_CONFIG_HOME defaults to ~/.config if not set.

Default keymap

Key Default binding Description
q quit quit
! shell spawn shell in current directory
j down next entry
k up previous entry
h left go to the parent directory
l right navigate to directory / open file
g first first entry
G last last entry
~ home go to home directory
. toggle-hidden toggle display of hidden entries
/ search start searching
Esc end-search stop searching
e edit edit file in $EDITOR
p pager view file in $PAGER
r rename rename file/directory
Space select select / deselect current entry
a select-all select all entries in current directory
s select-none clear selection
X delete delete selected entries
P copy copy selected entries
V move move selected entries
f new-file create (touch) a new file
d new-dir create a new directory
t new-tab new tab
w close-tab close tab
1..0 tab-x go to tab 1..10

If you prefer more Emacs-oriented movement keybindings, you can add this to your configuration file:

[Keybindings]

h=none
j=none
k=none
l=none

n=down
p=up
f=right
b=left

ToDo

  • Help page

Dependencies

Compile-time

The main dependency nimmm needs is the nim development toolchain, i.e. the nim compiler and the nimble package manager. A C compiler (gcc, clang, etc.) or a C++ compiler is necessary for compiling the generated C/C++ code to binaries.

Apart from that, these libraries are required:

  • termbox-devel or libtermbox-dev is required in order for the terminal user interface to work.

Run-time

Dependency Use
cp, mv, rm, mkdir, touch nimmm delegates all operations on files and directories to these utilities to save all the error-handling and permission-checking work. These utilities should (hopefully) be on your UNIX system
$SHELL or fallback /bin/sh a shell
$EDITOR or fallback vi an editor
$PAGER or fallback less a pager
$NIMMM_OPEN or fallback xdg-open a file opener

License

nimmm is licensed under the GNU General Public License v3.0 only.