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