summaryrefslogtreecommitdiffstats
path: root/src/constant_strings_paths.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/constant_strings_paths.rs')
-rw-r--r--src/constant_strings_paths.rs124
1 files changed, 82 insertions, 42 deletions
diff --git a/src/constant_strings_paths.rs b/src/constant_strings_paths.rs
index 854f509..dfac76c 100644
--- a/src/constant_strings_paths.rs
+++ b/src/constant_strings_paths.rs
@@ -1,60 +1,60 @@
/// Configuration folder path
-pub static CONFIG_FOLDER: &str = "~/.config/fm";
+pub const CONFIG_FOLDER: &str = "~/.config/fm";
/// Configuration file path
-pub static CONFIG_PATH: &str = "~/.config/fm/config.yaml";
+pub const CONFIG_PATH: &str = "~/.config/fm/config.yaml";
/// Filepath of the opener config file
-pub static OPENER_PATH: &str = "~/.config/fm/opener.yaml";
+pub const OPENER_PATH: &str = "~/.config/fm/opener.yaml";
/// Filepath of the TUIS configuration file
-pub static TUIS_PATH: &str = "~/.config/fm/tuis.yaml";
+pub const TUIS_PATH: &str = "~/.config/fm/tuis.yaml";
/// Filepath of the LOG configuration file
-pub static LOG_CONFIG_PATH: &str = "~/.config/fm/logging_config.yaml";
+pub const LOG_CONFIG_PATH: &str = "~/.config/fm/logging_config.yaml";
/// Path to the action log file
-pub static ACTION_LOG_PATH: &str = "~/.config/fm/log/action_logger.log";
+pub const ACTION_LOG_PATH: &str = "~/.config/fm/log/action_logger.log";
/// Path to the trash folder files
-pub static TRASH_FOLDER_FILES: &str = "~/.local/share/Trash/files";
+pub const TRASH_FOLDER_FILES: &str = "~/.local/share/Trash/files";
/// Path to the trash folder info file
-pub static TRASH_FOLDER_INFO: &str = "~/.local/share/Trash/info";
+pub const TRASH_FOLDER_INFO: &str = "~/.local/share/Trash/info";
/// Log file path. Rotating file logs are created in the same directeroy
-pub static LOG_PATH: &str = "~/.config/fm/fm{}";
+pub const LOG_PATH: &str = "~/.config/fm/fm{}";
/// File where marks are stored.
-pub static MARKS_FILEPATH: &str = "~/.config/fm/marks.cfg";
+pub const MARKS_FILEPATH: &str = "~/.config/fm/marks.cfg";
/// Temporary folder used when bulkrenaming files
-pub static TMP_FOLDER_PATH: &str = "/tmp";
+pub const TMP_FOLDER_PATH: &str = "/tmp";
/// Default terminal application used when openening a program in shell or starting a new shell
-pub static DEFAULT_TERMINAL_APPLICATION: &str = "st";
+pub const DEFAULT_TERMINAL_APPLICATION: &str = "st";
/// Opener used to play audio files. Does it require a terminal ?
-pub static DEFAULT_AUDIO_OPENER: (&str, bool) = ("mocp", true);
+pub const DEFAULT_AUDIO_OPENER: (&str, bool) = ("mocp", true);
/// Program used to to display images. Does it require a terminal ?
-pub static DEFAULT_IMAGE_OPENER: (&str, bool) = ("viewnior", false);
+pub const DEFAULT_IMAGE_OPENER: (&str, bool) = ("viewnior", false);
/// Program used to open "office" documents (word, libreoffice etc). Does it require a terminal ?
-pub static DEFAULT_OFFICE_OPENER: (&str, bool) = ("libreoffice", false);
+pub const DEFAULT_OFFICE_OPENER: (&str, bool) = ("libreoffice", false);
/// Program used to open readable documents (pdf, ebooks). Does it require a terminal ?
-pub static DEFAULT_READABLE_OPENER: (&str, bool) = ("zathura", false);
+pub const DEFAULT_READABLE_OPENER: (&str, bool) = ("zathura", false);
/// Program used to open text files. Does it require a terminal ?
-pub static DEFAULT_TEXT_OPENER: (&str, bool) = ("nvim", true);
+pub const DEFAULT_TEXT_OPENER: (&str, bool) = ("nvim", true);
/// Program used to open unknown files. Does it require a terminal ?
-pub static DEFAULT_OPENER: (&str, bool) = ("xdg-open", false);
+pub const DEFAULT_OPENER: (&str, bool) = ("xdg-open", false);
/// Program used to open vectorial images. Does it require a terminal ?
-pub static DEFAULT_VECTORIAL_OPENER: (&str, bool) = ("inkscape", false);
+pub const DEFAULT_VECTORIAL_OPENER: (&str, bool) = ("inkscape", false);
/// Program used to open videos. Does it require a terminal ?
-pub static DEFAULT_VIDEO_OPENER: (&str, bool) = ("mpv", false);
+pub const DEFAULT_VIDEO_OPENER: (&str, bool) = ("mpv", false);
/// Default program used to drag and drop files
-pub static DEFAULT_DRAGNDROP: &str = "dragon-drop";
+pub const DEFAULT_DRAGNDROP: &str = "dragon-drop";
/// Array of text representation of a file permissions.
/// The index of each string gives a correct representation.
-pub static PERMISSIONS_STR: [&str; 8] = ["---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"];
+pub const PERMISSIONS_STR: [&str; 8] = ["---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"];
/// Description of the application.
-pub static HELP_FIRST_SENTENCE: &str = "fm: a dired / ranger like file manager. ";
+pub const HELP_FIRST_SENTENCE: &str = " fm: a dired / ranger like file manager. ";
/// Description of the content below, aka the help itself.
-pub static HELP_SECOND_SENTENCE: &str = "Keybindings";
+pub const HELP_SECOND_SENTENCE: &str = " Keybindings ";
/// Description of the content below, aka the action log file
-pub static LOG_FIRST_SENTENCE: &str = "Logs: ";
+pub const LOG_FIRST_SENTENCE: &str = " Logs: ";
/// Description of the content below, aka what is logged there.
-pub static LOG_SECOND_SENTENCE: &str = "Last actions affecting the file tree";
+pub const LOG_SECOND_SENTENCE: &str = " Last actions affecting the file tree";
/// Video thumbnails
-pub static THUMBNAIL_PATH: &str = "/tmp/thumbnail.png";
+pub const THUMBNAIL_PATH: &str = "/tmp/thumbnail.png";
/// Array of hardcoded shortcuts with standard *nix paths.
-pub static HARDCODED_SHORTCUTS: [&str; 9] = [
+pub const HARDCODED_SHORTCUTS: [&str; 9] = [
"/",
"/dev",
"/etc",
@@ -65,12 +65,14 @@ pub static HARDCODED_SHORTCUTS: [&str; 9] = [
"/usr",
"/var",
];
-pub static BAT_EXECUTABLE: &str = "bat {} --color=always";
-pub static CAT_EXECUTABLE: &str = "cat {}";
-pub static RG_EXECUTABLE: &str = "rg --line-number \"{}\"";
-pub static GREP_EXECUTABLE: &str = "grep -rI --line-number \"{}\"";
+pub const BAT_EXECUTABLE: &str = "bat {} --color=always";
+pub const CAT_EXECUTABLE: &str = "cat {}";
+pub const RG_EXECUTABLE: &str = "rg --line-number \"{}\"";
+pub const GREP_EXECUTABLE: &str = "grep -rI --line-number \"{}\"";
+pub const SSHFS_EXECUTABLE: &str = "sshfs";
+pub const NOTIFY_EXECUTABLE: &str = "notity-send";
/// Sort presentation for the second window
-pub static SORT_LINES: [&str; 7] = [
+pub const SORT_LINES: [&str; 7] = [
"k: by kind (default)",
"n: by name",
"m: by modification time",
@@ -79,8 +81,14 @@ pub static SORT_LINES: [&str; 7] = [
"",
"r: reverse current sort",
];
+pub const REMOTE_LINES: [&str; 4] = [
+ "Mount a directory with sshfs",
+ "Type the arguments as below, separated by a space",
+ "",
+ "username hostname remote_path",
+];
/// Chmod presentation for the second window
-pub static CHMOD_LINES: [&str; 5] = [
+pub const CHMOD_LINES: [&str; 5] = [
"Type an octal mode like 754.",
"",
"4: read",
@@ -88,7 +96,7 @@ pub static CHMOD_LINES: [&str; 5] = [
"1: execute",
];
/// Filter presentation for the second window
-pub static FILTER_LINES: [&str; 6] = [
+pub const FILTER_LINES: [&str; 6] = [
"Type the initial of the filter and an expression if needed",
"",
"n {name}: by name",
@@ -97,10 +105,10 @@ pub static FILTER_LINES: [&str; 6] = [
"a: reset",
];
/// Password input presentation for the second window
-pub static PASSWORD_LINES: [&str; 1] =
+pub const PASSWORD_LINES: [&str; 1] =
["Type your password. It will be forgotten immediatly after use."];
/// Shell presentation for the second window
-pub static SHELL_LINES: [&str; 11] = [
+pub const SHELL_LINES: [&str; 11] = [
"Type a shell command",
"",
"`sudo` commands are supported.",
@@ -114,33 +122,65 @@ pub static SHELL_LINES: [&str; 11] = [
"%s: selected filepath",
];
/// Nvim address setter presentation for second window
-pub static NVIM_ADDRESS_LINES: [&str; 4] = [
+pub const NVIM_ADDRESS_LINES: [&str; 4] = [
"Type the Neovim RPC address.",
"",
"You can get it from Neovim with :",
"`:echo v:servername`",
];
/// Regex matcher presentation for second window
-pub static REGEX_LINES: [&str; 3] = [
+pub const REGEX_LINES: [&str; 3] = [
"Type a regular expression",
"",
"Flag every file in current directory matching the typed regex",
];
/// Newdir presentation for second window
-pub static NEWDIR_LINES: [&str; 3] = [
+pub const NEWDIR_LINES: [&str; 3] = [
"mkdir a new directory",
"",
"Nothing is done if the directory already exists",
];
/// New file presentation for second window
-pub static NEWFILE_LINES: [&str; 3] = [
+pub const NEWFILE_LINES: [&str; 3] = [
"touch a new file",
"",
"Nothing is done if the file already exists",
];
/// Rename presentation for second window
-pub static RENAME_LINES: [&str; 3] = [
+pub const RENAME_LINES: [&str; 3] = [
"rename the selected file",
"",
"Nothing is done if the file already exists",
];
+/// Executable commands whose output is a text to be displayed in terminal
+pub const CLI_INFO_COMMANDS: [&str; 4] = ["duf", "inxi -v 2 --color", "neofetch", "lsusb"];
+/// Wallpaper executable
+pub const NITROGEN: &str = "nitrogen";
+/// Mediainfo (used to preview media files) executable
+pub const MEDIAINFO: &str = "mediainfo";
+/// ueberzug (used to preview images, videos & fonts)
+pub const UEBERZUG: &str = "ueberzug";
+/// fontimage (used to preview fonts)
+pub const FONTIMAGE: &str = "fontimage";
+/// ffmpeg (used to preview video thumbnail)
+pub const FFMPEG: &str = "ffmpeg";
+/// rsvg-convert (used to preview svg files)
+pub const RSVG_CONVERT: &str = "rsvg-convert";
+/// jupyter. used to preview notebooks (.ipynb)
+pub const JUPYTER: &str = "jupyter";
+/// pandoc. used to preview .doc & .odb documents
+pub const PANDOC: &str = "pandoc";
+/// diff. used to preview diff between files
+pub const DIFF: &str = "diff";
+/// isoinfo. used to preview iso file content
+pub const ISOINFO: &str = "isoinfo";
+/// socket file explorer
+pub const SS: &str = "ss";
+/// lsblk is used to get mountpoints, info about encrypted drives
+pub const LSBLK: &str = "lsblk";
+/// cryptsetup is used to mount encrypted drives
+pub const CRYPTSETUP: &str = "cryptsetup";
+/// used to get information about fifo files
+pub const LSOF: &str = "lsof";
+/// neovim executable
+pub const NVIM: &str = "nvim";