Crate fm

Source

Modules§

  • The application and its status.
  • Utiliy functions & constants.
  • Everything about configuration from text files in $HOME/.config/fm.
  • The events and their handling.
  • 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.
  • 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§

  • Iter over the content, returning a triplet of (index, line, style).
  • Implement the SelectableContent for struct $struc with content type $content_type. This trait allows to navigate through a vector of element content_type. It implements: is_empty, len, next, prev, selected. selected returns an optional reference to the value.
  • 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.
  • Implement the SelectableContent for struct $struc with content type $content_type. This trait allows to navigate through a vector of element content_type. It implements: is_empty, len, next, prev, selected. selected returns an optional reference to the value.
  • 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 as format.
  • Writes the message to the global variable LAST_LOG_LINE and a the special 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.