Expand description
fm: a TUI file manager inspired by ranger & dired.
fm comes with a lot of features. It aims to be easy to use and configure. All actions are accessible from the help (default bind: Shift+H).
Modules§
- app
- The application and its status.
- common
- Utiliy functions & constants.
- config
- Everything about configuration from text files in
$HOME/.config/fm. - event
- The events and their handling.
- io
- Everything about IO – except input from terminal. It’s responsible for the argument parsing, the display, the execution of commands, the logs, accessing the cloud (google drive only ATM) and opening files.
- modes
- The different modes the application use. The application use 4 windows “display” & “menu”, left & right. Display holds the files or their content, menus regroup similar actions from changing permissions to establish an sshfs mount point.
Macros§
- colored_
skip_ take - Iter over the content, returning a triplet of
(index, line, style). - impl_
content - Implement the
SelectableContentfor struct$strucwith content type$content_type. This trait allows to navigate through a vector of elementcontent_type. It implements:is_empty,len,next,prev,selected.selectedreturns an optional reference to the value. - impl_
draw_ menu_ with_ char - Used to implement a
crate::io::DrawMenutrait for Navigable menu which allows their item to be selected with acharbind. Every menu which allows the user to select an item from a list without reading input should use this macro for the rendering. - impl_
index_ to_ index - Implement an iterator from next index of content to the same index, starting back from 0 when the last element is reached. It’s used to search an element in content below current and then from the first index to the current index.
- impl_
selectable - Implement the
SelectableContentfor struct$strucwith content type$content_type. This trait allows to navigate through a vector of elementcontent_type. It implements:is_empty,len,next,prev,selected.selectedreturns an optional reference to the value. - log_
info - Log a formated message to the default log.
Won’t write anything if the same message is sent multiple times.
It uses
log::info!internally. It accepts the same formatted messages asformat. - log_
line - Writes the message to the global variable
LAST_LOG_LINEand a the action log. It can be displayed with the default bind ALt+l and at the last line of the display. Every action which change the filetree, execute an external command or which returns an error should be logged this way.