Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Minimalistic ncurses file system viewer

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHOR
Octocat-spinner-32 COPYING
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
Octocat-spinner-32 cmd.c
Octocat-spinner-32 fm.c
Octocat-spinner-32 fm.h
Octocat-spinner-32 fs.c
Octocat-spinner-32 gen_protos.sh
Octocat-spinner-32 ino.c
Octocat-spinner-32 ui.c
README
 fm (Fast Move: minimalistic ncurses file system viewer)
=========================================================

Small, simple and efficient file system viewer for the console. It
offers fast navigation, easy invocation of your common tools
(Emacs/Vim/Xpdf/Evince/less/...) and instant access to your favorite
shell. It also can use Linux inotify to update the file tree.


 How to compile
----------------

It should run in any modern UNIX-like with minimal effort. You just need
to have installed ncursesw, glib and its development headers. Then
just run:

	make


 Hacking
---------

Internally the file system hierarchy is represented in a N-ary tree in
which each node represents a file and its associated information.
Additionally a double-linked list is used to represent the lines from
screen. The glib is used for its N-ary trees and double-linked lists.
Also some string manipulation functions are used for commodity. The rest
is standard POSIX code.


 Invocation
------------

	Usage: fm [-h|-d] [<dir>]
		-h: show this help
		-d: print on stderr inotify events debug info


 Keyboard commands
-------------------

Most commands are based in text navigation of Vim.

Moving the cursor:

	j:		selects next file
	k:		selects previous file
	l:		opens selected directory (open the directory twice to
			shows dot files)
	h:		closes current/selected directory
	Ctrl + f:	moves one page forward the cursor
	Ctrl + b:	moves one page backward the cursor
	Ctrl + d:	moves half page forward the cursor
	Ctrl + u:	moves half page backward the cursor
	gg:		selects first file
	G:		selects last file
	zz:		centers selected file on screen
	H:		selects first line from screen
	L:		selects last line from screen
	}:		selects next file without going deeper in the hierarchy
	{:		selects previous file without going deeper in the hierarchy
	[[:		selects parent directory
	f + <letter>:	selects next file that begins with <letter>
	F + <letter>:	selects previous file that begins with <letter>

Running external programs:

	l:		opens the selected file with text pager/PDF viewer/PS
			viewer/image viewer (based on the file name extension)
	s:		spawns the shell in the current directory (Use Ctrl + d to return)
	Enter:		starts the editor with selected file

Miscellanea:

	q:		quits fm
	Ctrl + l:	redraws the entire screen and reloads the content
			of the current working directory
	Ctrl + g:	prints info from the selected like ls -l
	Esc:		clears info window and sets command repetitions to one

The default choices for the external programs are
vim/evince/display/less/bash. They are configured from fm.h. Also the
environment variables PAGER and EDITOR can be customized from the shell.
The commands h j k l can be repeated several times with just one
keystroke if a number is given first, just like Vim commands
repetitions. The cursor can also be moved with the arrows from the
keyboard.


 Project status
----------------

Version 1.1 finished, Linux inotify support added.


 License
---------

This program is under the GPLv3.


 Feedback
----------

Send me an email if you have any question about the code, you found a
bug or you have a feature request. Send it to:

	jimenezrick@gmail.com
Something went wrong with that request. Please try again.