Skip to content

jimenezrick/fast-move

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 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

About

Minimalistic ncurses file system viewer

Resources

License

Stars

Watchers

Forks

Packages

No packages published