/fm

A terminal based file manager

Primary LanguageGoMIT LicenseMIT

Keep those files organized

Latest Release GoDoc Build Status

default screenshot

About The Project

A terminal based file manager

Built With

Installation

Curl

curl -sfL https://raw.githubusercontent.com/knipferrc/fm/main/install.sh | sh

Go

go install github.com/knipferrc/fm@latest

Features

  • Double pane layout
  • File icons
  • Layout adjusts to terminal resize
  • Syntax highlighting for source code with customizable themes using styles from chroma (dracula, monokai etc.)
  • Render pretty markdown
  • Mouse support
  • Themes (default, gruvbox, spooky)
  • Render PNG, JPG and JPEG as strings
  • Colors adapt to terminal background
  • Open selected file in editor set in EDITOR environment variable (currently only supports GUI editors)

Themes

Default

default dark

default light

Gruvbox

gruvbox dark

gruvbox light

Spooky

spooky dark

spooky light

Usage

  • Run fm or fm /some/dir

Navigation

Key Description
h or left Go back to previous directory
j or down Move down in the file tree or scroll pane down
k or up Move up in the file tree or scroll pane up
l or right Opens the currently selected directory or file
gg Jump to bottom of file tree or pane
G Jump to top of file tree or pane
~ Go to home directory
/ Go to the root directory
. Toggle hidden files and directories
- Go to previous directory
ctrl+c Exit
q Exit if command bar is not open
m Move the currently selected file or directory. Once pressed, the file manager enters move mode. Navigate the tree as usual and press enter in the desired destination directory. It will navigate back to the starting direcotry in which the move was initiated
: Open command bar
tab Toggle between panes
esc Cancel any current action. Pressing escape during any action (rename, move, delete) will cancel that operation and return back to file navigation
z Create a zip file of the currently selected directory item
u Unzip a zip file
c Create a copy of a file or directory
D Delete the currently selected file or directory
n Create a new file in the current directory
N Create a new directory in the current directory
r Rename the currently selected file or directory
E Open in editor set in EDITOR environment variable

Configuration

  • A config file will be generated at ~/.fm.yml when you first run fm
settings:
  borderless: false
  enable_logging: false
  enable_mousewheel: true
  pretty_markdown: true
  show_icons: true
  start_dir: .
  syntax_theme: dracula
  theme: default

Local Development

Follow the instructions below to get setup for local development

  1. Clone the repo
git clone https://github.com/knipferrc/fm
  1. Run
make
  1. Build a binary
make build

Credit