1pub const CONFIG_FOLDER: &str = "~/.config/fm";
3pub const CONFIG_PATH: &str = "~/.config/fm/config.yaml";
5pub const SESSION_PATH: &str = "~/.config/fm/session.yaml";
7pub const OPENER_PATH: &str = "~/.config/fm/opener.yaml";
9pub const TUIS_PATH: &str = "~/.config/fm/tuis.yaml";
11pub const CLI_PATH: &str = "~/.config/fm/cli.yaml";
13pub const INPUT_HISTORY_PATH: &str = "~/.config/fm/log/input_history.log";
15pub const SYNTECT_THEMES_PATH: &str = "~/.config/fm/syntect_themes/";
17pub const NORMAL_LOG_PATH: &str = "~/.config/fm/log/fm.log";
19pub const ACTION_LOG_PATH: &str = "~/.config/fm/log/action_logger.log";
21pub const REPOSITORIES_PATH: &str = "/tmp/fm/plugin/cloned_repositories";
23pub const PLUGIN_LIBSO_PATH: &str = "~/.local/share/fm/plugins";
25pub const TRASH_FOLDER_FILES: &str = "~/.local/share/Trash/files";
27pub const TRASH_FOLDER_INFO: &str = "~/.local/share/Trash/info";
29pub const TRASH_INFO_EXTENSION: &str = ".trashinfo";
31pub const MARKS_FILEPATH: &str = "~/.config/fm/marks.cfg";
33pub const TMP_FOLDER_PATH: &str = "/tmp";
35pub const TMP_THUMBNAILS_DIR: &str = "/tmp/fm-thumbnails";
37pub const SYNTECT_DEFAULT_THEME: &str = "monokai";
39pub const SETSID: &str = "setsid";
41pub const OPENER_AUDIO: (&str, bool) = ("mocp", true);
43pub const OPENER_IMAGE: (&str, bool) = ("viewnior", false);
45pub const OPENER_OFFICE: (&str, bool) = ("libreoffice", false);
47pub const OPENER_READABLE: (&str, bool) = ("zathura", false);
49pub const OPENER_TEXT: (&str, bool) = ("nvim", true);
51pub const OPENER_DEFAULT: (&str, bool) = ("xdg-open", false);
53pub const OPENER_VECT: (&str, bool) = ("inkscape", false);
55pub const OPENER_VIDEO: (&str, bool) = ("mpv", false);
57pub const NORMAL_PERMISSIONS_STR: [&str; 8] =
60 ["---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"];
61pub const SETUID_PERMISSIONS_STR: [&str; 8] =
62 ["--S", "--s", "-wS", "-ws", "r-S", "r-s", "rwS", "rws"];
63pub const SETGID_PERMISSIONS_STR: [&str; 8] = SETUID_PERMISSIONS_STR;
64pub const STICKY_PERMISSIONS_STR: [&str; 8] =
65 ["--T", "--t", "-w-", "-wt", "r-T", "r-t", "rwT", "rwt"];
66pub const HELP_FIRST_SENTENCE: &str = " fm: a dired / ranger like file manager. ";
68pub const HELP_SECOND_SENTENCE: &str = " Keybindings ";
70pub const LOG_FIRST_SENTENCE: &str = " Logs: ";
72pub const LOG_SECOND_SENTENCE: &str = " Last actions affecting the file tree";
74pub const THUMBNAIL_PATH_PNG: &str = "/tmp/fm_thumbnail.png";
76pub const THUMBNAIL_PATH_JPG: &str = "/tmp/fm_thumbnail.jpg";
78pub const THUMBNAIL_PATH_NO_EXT: &str = "/tmp/fm_thumbnail";
80pub const CALC_PDF_PATH: &str = "/tmp/fm_calc.pdf";
82pub const HARDCODED_SHORTCUTS: [&str; 9] = [
84 "/",
85 "/dev",
86 "/etc",
87 "/mnt",
88 "/opt",
89 "/run/media",
90 "/tmp",
91 "/usr",
92 "/var",
93];
94pub const RG_EXECUTABLE: &str = "rg --line-number --color=never .";
96pub const GREP_EXECUTABLE: &str = "grep -rI --line-number .";
98pub const SSHFS_EXECUTABLE: &str = "sshfs";
100pub const NOTIFY_EXECUTABLE: &str = "notity-send";
102pub const EJECT_EXECUTABLE: &str = "eject";
104pub const ENCRYPTED_DEVICE_BINDS: &str = "m: mount -- u: unmount -- g: go to mount point";
106pub const SORT_LINES: [&str; 9] = [
108 "Type the initial",
109 "",
110 "k: by kind (default)",
111 "n: by name",
112 "m: by modification time",
113 "s: by size",
114 "e: by extension",
115 "",
116 "r: reverse current sort",
117];
118pub const REMOTE_LINES: [&str; 5] = [
120 "Mount a directory with sshfs",
121 "Type the arguments as below, separated by a space.",
122 "Port and local path are optional",
123 "",
124 "username hostname:port remote_path local_path",
125];
126pub const CLOUD_NEWDIR_LINES: [&str; 1] = ["Create a new directory in current cloud path"];
128pub const CHMOD_LINES: [&str; 5] = [
130 "Type an octal like \"754\", a text like \"rwxr.xr..\" or \"a+x\"",
131 "",
132 "4: read",
133 "2: write",
134 "1: execute",
135];
136pub const FILTER_LINES: [&str; 6] = [
138 "Type the initial of the filter and an expression if needed",
139 "",
140 "n {name}: by name",
141 "e {extension}: by extension",
142 "d: only directories",
143 "a: reset",
144];
145pub const PASSWORD_LINES_SUDO: [&str; 2] = [
147 "Type your sudo password.",
148 "It will be forgotten immediatly after use.",
149];
150pub const PASSWORD_LINES_DEVICE: [&str; 2] = [
152 "Type the device passkey.",
153 "It will be forgotten immediatly after use.",
154];
155pub const SHELL_LINES: [&str; 13] = [
157 "Type a shell command",
158 "",
159 "`sudo` commands are supported.",
160 "Pipes, redirections ( | < > >> ) and shell specific syntax (*) aren't supported.",
161 "",
162 "Some expression can be expanded:",
163 "%s: the selected file",
164 "%f: the flagged files",
165 "%e: the extension of the file",
166 "%n: the filename only",
167 "%d: the full path of the current directory",
168 "%t: execute the command in the same window",
169 "%c: the current clipboard as a string",
170];
171pub const NVIM_ADDRESS_LINES: [&str; 4] = [
173 "Type the Neovim RPC address.",
174 "",
175 "You can get it from Neovim with :",
176 "`:echo v:servername`",
177];
178pub const REGEX_LINES: [&str; 3] = [
180 "Type a regular expression",
181 "",
182 "Flag every file in current directory matching the typed regex",
183];
184pub const NEWDIR_LINES: [&str; 3] = [
186 "mkdir a new directory",
187 "",
188 "Nothing is done if the directory already exists",
189];
190pub const NEWFILE_LINES: [&str; 3] = [
192 "touch a new file",
193 "",
194 "Nothing is done if the file already exists",
195];
196pub const RENAME_LINES: [&str; 3] = [
198 "rename the selected file",
199 "",
200 "Nothing is done if the file already exists",
201];
202pub const TRASH_CONFIRM_LINE: &str =
204 "Up, Down: navigation - Enter: restore the selected file - x: delete permanently - ";
205pub const MEDIAINFO: &str = "mediainfo";
207pub const UEBERZUG: &str = "ueberzug";
209pub const FONTIMAGE: &str = "fontimage";
211pub const FFMPEG: &str = "ffmpeg";
213pub const RSVG_CONVERT: &str = "rsvg-convert";
215pub const JUPYTER: &str = "jupyter";
217pub const PANDOC: &str = "pandoc";
219pub const ISOINFO: &str = "isoinfo";
221pub const SS: &str = "ss";
223pub const MKDIR: &str = "mkdir";
225pub const MOUNT: &str = "mount";
227pub const UMOUNT: &str = "umount";
229pub const LSBLK: &str = "lsblk";
231pub const CRYPTSETUP: &str = "cryptsetup";
233pub const UDISKSCTL: &str = "udisksctl";
235pub const GIO: &str = "gio";
237pub const UDEVADM: &str = "udevadm";
239pub const NVIM: &str = "nvim";
241pub const BSDTAR: &str = "bsdtar";
243pub const SEVENZ: &str = "7z";
245pub const LIBREOFFICE: &str = "libreoffice";
247pub const LAZYGIT: &str = "lazygit";
249pub const NCDU: &str = "ncdu";
251pub const TRANSMISSION_SHOW: &str = "transmission-show";
253pub const ZOXIDE: &str = "zoxide";
255pub const PDFTOPPM: &str = "pdftoppm";
257pub const PDFINFO: &str = "pdfinfo";
259pub const PDFTOTEXT: &str = "pdftotext";
261pub const READELF: &str = "readelf";
263pub const DIR_ICON: &str = " ";