diff options
author | qkzk <qkzk@users.noreply.github.com> | 2023-05-18 17:59:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 17:59:56 +0200 |
commit | c8f062fb50a90dcb4aadfb4cba89b1853f400391 (patch) | |
tree | b0c3d37816a7204a65bdea7f2a0083c1effcdbff | |
parent | 64d88ee791ee544aea618dd1795c5cf90cd51b68 (diff) | |
parent | d16674dc472c00786fd20274a9e2f69820c5c4b1 (diff) |
Merge pull request #79 from qkzk/v0.1.21-devv0.1.21
V0.1.21 dev
-rw-r--r-- | Cargo.lock | 18 | ||||
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | config_files/fm/config.yaml | 36 | ||||
-rw-r--r-- | development.md | 99 | ||||
-rw-r--r-- | readme.md | 120 | ||||
-rw-r--r-- | src/action_map.rs | 200 | ||||
-rw-r--r-- | src/config.rs | 51 | ||||
-rw-r--r-- | src/constant_strings_paths.rs | 78 | ||||
-rw-r--r-- | src/copy_move.rs | 2 | ||||
-rw-r--r-- | src/cryptsetup.rs | 117 | ||||
-rw-r--r-- | src/event_dispatch.rs | 70 | ||||
-rw-r--r-- | src/event_exec.rs | 1703 | ||||
-rw-r--r-- | src/fileinfo.rs | 8 | ||||
-rw-r--r-- | src/help.rs | 178 | ||||
-rw-r--r-- | src/iso.rs | 94 | ||||
-rw-r--r-- | src/keybindings.rs | 67 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/log.rs | 5 | ||||
-rw-r--r-- | src/main.rs | 9 | ||||
-rw-r--r-- | src/mocp.rs | 20 | ||||
-rw-r--r-- | src/mode.rs | 11 | ||||
-rw-r--r-- | src/opener.rs | 42 | ||||
-rw-r--r-- | src/password.rs | 59 | ||||
-rw-r--r-- | src/preview.rs | 8 | ||||
-rw-r--r-- | src/shell_menu.rs | 4 | ||||
-rw-r--r-- | src/shell_parser.rs | 102 | ||||
-rw-r--r-- | src/shortcut.rs | 14 | ||||
-rw-r--r-- | src/sort.rs | 18 | ||||
-rw-r--r-- | src/status.rs | 309 | ||||
-rw-r--r-- | src/tab.rs | 234 | ||||
-rw-r--r-- | src/term_manager.rs | 107 | ||||
-rw-r--r-- | src/utils.rs | 46 |
32 files changed, 2184 insertions, 1651 deletions
@@ -844,7 +844,7 @@ dependencies = [ [[package]] name = "fm-tui" -version = "0.1.20" +version = "0.1.21" dependencies = [ "anyhow", "chrono", @@ -879,6 +879,7 @@ dependencies = [ "ueberzug", "url-escape", "users", + "which", "zip", ] @@ -2431,9 +2432,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.26.9" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c18a6156d1f27a9592ee18c1a846ca8dd5c258b7179fc193ae87c74ebb666f5" +checksum = "02f1dc6930a439cc5d154221b5387d153f8183529b07c19aca24ea31e0a167e1" dependencies = [ "cfg-if", "core-foundation-sys", @@ -3014,6 +3015,17 @@ dependencies = [ ] [[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1,6 +1,6 @@ [package] name = "fm-tui" -version = "0.1.20" +version = "0.1.21" authors = ["Quentin Konieczko <qu3nt1n@gmail.com>"] edition = "2021" license-file = "LICENSE.txt" @@ -55,7 +55,7 @@ strfmt = "0.2.2" strum = {version = "0.24.1", features = ["derive"]} strum_macros = "0.24.3" syntect = "5.0.0" -sysinfo = "0.26.7" +sysinfo = "0.29.0" tar = "0.4.38" tuikit = "0.5.0" url-escape = "0.1.1" @@ -63,3 +63,4 @@ users = "0.11.0" zip = "0.6.4" tokio = "1" ueberzug = "0.1.0" +which = "4.4.0" diff --git a/config_files/fm/config.yaml b/config_files/fm/config.yaml index 6c386d4b..1f9fb410 100644 --- a/config_files/fm/config.yaml +++ b/config_files/fm/config.yaml @@ -33,11 +33,12 @@ keys: 'c': CopyPaste 'd': NewDir 'e': Exec - 'g': Goto - 'h': Help + 'g': KeyHome + 'h': MoveLeft 'i': NvimFilepicker - 'j': Jump - 'l': Symlink + 'j': MoveDown + 'k': MoveUp + 'l': MoveRight 'm': Chmod 'n': NewFile 'o': OpenFile @@ -52,20 +53,41 @@ keys: 'x': DeleteFile 'shift-b': Bulk 'shift-f': Filter - 'shift-g': Shortcut - 'shift-h': History + 'shift-g': End + 'shift-h': Help + 'shift-L': Symlink 'shift-m': MarksNew 'shift-o': Sort 'shift-p': Preview 'shift-t': MediaInfo 'ctrl-c': CopyFilename - 'ctrl-d': Delete 'ctrl-e': EncryptedDrive 'ctrl-f': FuzzyFind + 'ctrl-g': Shortcut 'ctrl-p': CopyFilepath 'ctrl-q': ModeNormal 'ctrl-r': RefreshView 'alt-d': DragNDrop 'alt-e': ToggleDisplayFull + 'alt-g': Goto 'alt-p': TogglePreviewSecond 'alt-f': ToggleDualPane +settings: + dual: true + full: true + +# Custom command : +# * Use an unused keybind +# * Don't use pipe or redirection, it won't be parsed correctly +# * Use full path for the command : `/usr/bin/ls` not `ls` +# * Use expensions : +# Expansions : +# - %s: the full path of the currently selected file or folder, +# - %f: the list of the full paths of the flagged files. +# - %e: the extension of the file. +# - %n: the filename only. +# - %p: the full path of the current directory. +# Example: +# 'alt-u': "/usr/bin/ls %f" +custom: + 'alt-u': "/usr/bin/google-chrome-stable %s" diff --git a/development.md b/development.md index 282e20da..6ba0f4bb 100644 --- a/development.md +++ b/development.md @@ -453,6 +453,45 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [x] mocp go to song: `mocp -Q %file` with alt+enter (lack of a better keybinding) - [x] display openers in help +## Current dev + +### Version 0.1.21 + +- [x] more shortcuts like `nnn` : `\` root, @: start +- [x] display settings (dual pane, full display) can be setup in config file. +- [x] common vim keys: require an update of the config file + - [x] hjkl + - [x] g G + - [x] J K C+u C+d + - [ ] ??? +- [x] custom shell command on selection or flagged files, with or without confirmation +- [x] custom action in help +- [x] FIX: absent key in config file can crash the app +- [x] basic shell execution with ! + - [x] completion with which crate + - [x] shell expansion %e %f etc +- [x] Refactor: use &[] instead of &Vec for arguments in command execution functions. +- [x] Explain every inputsimple mode in second window with static strings +- [x] FIX isodevice: + - [x] remove useless mode + - [x] use selected filepath instead of current directory +- [x] after mounting an iso device, move to its mountpoint +- [x] allow generic types for executable in `execute_...` commands +- [x] allow sudo commands from ! actions + - [x] separate password holder from device action + - [x] dispatch password + - [x] execute a command with sudo privileges +- [x] FIX: modification time used `%d/%m/%y`. Changed to `%Y/%m/%d` to allow sorting and respect conventions +- [x] display sort kind in first row +- [x] EventExec refactor + - [x] event: linked to an Action, same name + - [x] exec: linked to an executable mode, same name + - [x] every helper should be moved outside the struct +- [x] FIX: impossible to compile on MacOs since to `sysinfo::Disk` only implement `PartialEq` on linux. + Can't test MacOs compilation since I don't own a mac... +- [x] FIX: incompatible config files between versions crashes the app. +- [x] FIX: Help string susbtitution aren't aligned properly + ## TODO - [ ] remote control @@ -470,7 +509,6 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [ ] display / event separation. use async and message passing between coroutines -- [ ] vim keys, harmonize keybinds with ranger - [ ] zoxide support - [ ] make navigable content scrollable - [ ] temporary marks @@ -485,15 +523,16 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [ ] allow non tui like wttr, diff, bat, tail -n etc. - [ ] more options like "use flagged files" for diff - - [ ] build option to force reset of config file, warn the user at first start - - [ ] optionable "plugin" started from config file. Would require every option to be `Option<Plugin>` and may cause problems with the borrow checker. - - [ ] edit folder like a buffer [oil like](https://github.com/stevearc/oil.nvim) - - [ ] allow pipe in execution - - [ ] refactor cryptdevice and iso_file - - [ ] mode to handle those mounts. ATM it's all over the place... - - [ ] allow mounting some other devices - - [ ] list non mounted devices, list all mount points - - [ ] act on them +- [ ] build option to force reset of config file, warn the user at first start +- [ ] optionable "plugin" started from config file. Would require every option to be `Option<Plugin>` and may cause problems with the borrow checker. +- [ ] edit folder like a buffer [oil like](https://github.com/stevearc/oil.nvim) +- [ ] allow pipe in execution +- [ ] refactor cryptdevice and iso_file + + - [ ] mode to handle those mounts. ATM it's all over the place... + - [ ] allow mounting some other devices + - [ ] list non mounted devices, list all mount points + - [ ] act on them - [ ] sub window / menu for completion / selection. @@ -504,7 +543,6 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [ ] Version 0.1.50 : safety & memory usage - [ ] there's a memory leak somewhere - - [ ] command::execute in child: prevent it from crashing main app - [ ] preview of big files (or whatever file) should only read chunk of the file, not the whole thing. Previewing a 5gB iso file uses up to 15gB of ram, which will crash any system. or should it ? @@ -553,3 +591,42 @@ All of this stuff can be done easily through a shell command or automatically. I ### CLI - [CLI crates](https://lib.rs/command-line-interface) + +### Chat GPT ideas + +Tell me 10 cool features a TUI file manager could have + +Sure! Here are 10 cool features a TUI (Text-based User Interface) file manager +could have: + +Easy navigation: A TUI file manager should allow users to navigate through +directories and files quickly and easily using keyboard shortcuts. + +File previews: Users can preview the contents of a file without having to open +it. This feature can be particularly useful for large text files, images, or +videos. + +Customizable interface: A TUI file manager should be customizable so that users +can choose the information they want to see on the screen, such as file size, +modification date, and file type. + +File operations: Basic file operations like copying, moving, and deleting +should be easily accessible and efficient to perform. + +Bulk operations: A TUI file manager should allow users to perform bulk +operations on multiple files at once, such as renaming or deleting them. + +Tabbed interface: A tabbed interface allows users to have multiple directories +open at the same time, making it easy to move files between them. + +Bookmarking: Users can bookmark frequently used directories for quick access. + +Integrated terminal: A TUI file manager can include an integrated terminal to +execute commands without switching to another application. + +Search functionality: Users can search for files based on their name, content, +or other criteria, with the search results displayed in real-time. + +Cloud storage integration: TUI file managers can integrate with cloud storage +services like Dropbox, Google Drive, or OneDrive, allowing users to manage +their cloud files directly from the file manager interface. @@ -23,6 +23,13 @@ Options: -V, --version Print version information ``` +## Platform + +Linux is the only supported platform. + +- Version 0.1.20 doesn't compile on MacOS (see [#77](https://github.com/qkzk/fm/issues/77)). +- Version 0.1.21 fixes this bug but I can't test more since I don't own a mac :) + ## Video ![fm](./fm.gif) @@ -53,57 +60,66 @@ If you added the [recommanded function](#cd-on-quit) to your bashrc/zshrc, simpl Some features depends on external programs to keep fm from being really bloated. +### Navigation + - Navigate with the arrows or the mouse (left select, right open, wheel) + Basic vim keys are supported by default: hjkl, gG, Ctrl+U Ctrl+D, JK - Open a file with o, enter or right click - Execute a file with a custom command with e -- Copy / move / symlinks / delete with c, p, s, x + +### Moving + +Many ways to jump somewhere : + +- Alt+g: type the full address (with completion enabled), +- Ctrl+g: a predefined shortcut (default root folders, home and mount points, gitroot, config folder), +- Alt+j: by jumping to a flagged file, +- ': by creating your own marks and jumping to them + +### File manipulation + +- Flag files with `space` (\*: flag all, v: reverse, u: unflag) +- Copy / move / symlinks / delete / trash flagged files with c, p, s, x, X - Create files, directory, rename with n, d, r +- Flag a bunch of file, change panel with TAB and move/copy them ! +- Open the trash with Alt+o. x to remove permanently, enter to restore. Wipe the trash with Alt+x. +- Rename or create a bunch of file with B. Flag files, B, edit the names and save the file. The renaming is done. + You can create nested files with `a/b/c` which will create every intermediate folder if needed. + +### Shell + - Open a new shell in this directory with s - Start a configured TUI application with S -- Flag a bunch of file, change panel with TAB and move/copy them ! -- Many ways to jump somewhere : +- Execute a shell command with '!'. Expansions (%e ext, %n filename, %s filepath, %f flagged files, %d current directory) are supported. + pipes and redirections aren't supported. - - g: type the full address (with completion enabled), - - G: a predefined shortcut (default root folders, home and mount points, gitroot, config folder), - - j: by jumping to a flagged file, - - ': by creating your own marks and jumping to them +### Display -- Change display, removing details or displaying a single pane. +- Change display, removing details with Alt+e or display a single pane with Alt+d - Preview most of files (text, highlighted code, binary, pdf, exif details, video/audio details, archives) with P -- Display a tree view of directory by previewing it -- Decompress an archive by opening it (o, enter, right click) -- Compress flagged files with C. Pick the desired algorithm from a menu. -- Copy a filename/filepath to clipboard with Ctrl+n, Ctrl+p -- Rename or create a bunch of file with B. Flag files, B, edit the names and save the file. The renaming is done. - You can create nested files with `a/b/c` which will create every intermediate folder if needed. -- Use the integrated fuzzy finder (forked version of skim, an fzf clone) with Ctrl+f to navigate quickly -- The same fuzzy finder can find specific lines in files with Ctrl+s -- Filter the view (by extension, name, directory only, all files) with F -- Find files with / (with completion), flag files matching a regex with w -- Detect removable disks automatically and jump to them in a few keystrokes (G, up, enter) -- Drag and drop files (requires dragon-drop installed) with Alt+D -- Trash a file with X, open the trash with Alt+o. x to remove permanently, enter to restore. Wipe the trash with Alt+x. - Toggle the tree view with t. Fold selected folder with z. Unfold every folder with Z, fold every folder with Alt+z. -- Open and mount encrypted devices. Open the menu with Shift+e, mount with m, unmount with u. -- diff the first two files / folders with D. - Enter preview mode with Alt+P. Every file is previewed in the second pane. -- Contol MOCP with Ctrl+arrows. Ctrl+Left, Ctrl+Right: previous or next song. Ctrl+Down: Toggle pause. Ctrl+Up: add current folder to playlist -- Set the selected image as wallpaper with W. -- _Experimental_ enter "command mode" with ':'. Type the name of a command and it will be executed. +- Filter the view (by extension, name, directory only, all files) with F +- Find files with / (with completion: Tab, enter to search), +- flag files matching a regex with w + +### Fuzzy finder -Most of those features are inspired by ranger and alternatives (Midnight commander), the look and feel by dired. +- Use the integrated fuzzy finder (forked version of skim, an fzf clone) with Ctrl+f to navigate quickly +- The same fuzzy finder can find specific lines in files with Ctrl+s +- Another fuzzy finder is available for your keybinds with Alt+h -## Neovim filepicker +### Neovim filepicker When you open a file with i, it will send an event to Neovim and open it in a new buffer. -Recent versions of neovim export the RPC server address to an environement variable which is read if no argument +Recent versions of neovim export the RPC server address to an environment variable which is read if no argument is provided. It should always work, even outside of neovim. It's also possible to pass the RPC server address with `fm -s address`. -## cd on quit +### cd on quit When leaving fm, it prints the last visited path. If you add this function to your `zshrc` / `bashrc`, it will listen to stdout and cd to the last dir. @@ -131,6 +147,39 @@ function f end ``` +### Archives + +- Decompress an archive by opening it (o, enter, right click) +- Compress flagged files with C. Pick the desired algorithm from a menu. + +### Custom binds + +You can bind any _unbound_ key to a shell command. + +- pipe & redirections (| > >> <) aren't supported ! +- the first word you type is the executable. Don't start your command with environment variables, it won't work. + +Expansions : + +- %e : extension +- %s : selected file (full path) +- %f : flagged files (full path) +- %n : selected filename +- %d : current directory + +### More + +- Copy a filename/filepath to clipboard with Ctrl+n, Ctrl+p +- Detect removable disks automatically and jump to them in a few keystrokes (Ctrl+g, up, enter) +- Drag and drop files (requires dragon-drop installed) with Alt+d +- Open and mount encrypted devices. Open the menu with Shift+e, mount with m, unmount with u. +- diff the first two flagged files / folders with D. +- Contol MOCP with Ctrl+arrows. Ctrl+Left, Ctrl+Right: previous or next song. Ctrl+Down: Toggle pause. Ctrl+Up: add current folder to playlist +- Set the selected image as wallpaper with W. +- _Experimental_ enter "command mode" with ':'. Type the name of a command and it will be executed. + +Most of those features are inspired by ranger and alternatives (Midnight commander, nnn, lf etc.), the look and feel by dired. + ## Default keybindings Press `h` by default to display the help. @@ -244,6 +293,13 @@ You can configure : - **Keybindings**. Some should be left as they are, but all keybindings can be configured. use the provided config file as a default. Multiple keys can be bound the the same action. +- **Custom actions**. You can bind any key to a shell command. + - don't use pipes or redirectons, they won't be parsed correctly + - use an unset bind + - %s is expanded to the selected path, %f is expanded to the flagged files (full paths). + - See the [config](./config_files/fm/config.yaml) or an example. +- **Settings**. Do you whish to start with dual pane ? Do you wish to use basic or + full display ? - **Openers**. fm tries to be smart and open some files with a standard program. You can change that and use whatever installed program you want. Specify if it requires a shell to be run (like neovim) or not (like subl). @@ -256,8 +312,10 @@ You can configure : ## External dependencies -Most of the openers and tui applications are configurable from config files. Some are hardcode since their command is quite specific or if I couldn't find a workaround. +Most of the openers and tui applications are configurable from config files. Some are hardcoded if their command is quite specific or if I couldn't find a workaround. +- [lsblk](https://linux.die.net/man/8/lsblk): list encroytped devices +- [faillock](https://linux.die.net/man/8/faillock): reset failed sudo attempts - [Cryptsetup](https://gitlab.com/cryptsetup/cryptsetup): decrypt & mount encrypted devices - [Nitrogen](https://github.com/l3ib/nitrogen/): set up a wallpaper - [MOC](https://moc.daper.net/) Music On Console allows you to play music from your terminal diff --git a/src/action_map.rs b/src/action_map.rs index 99e14a29..0ab9c856 100644 --- a/src/action_map.rs +++ b/src/action_map.rs @@ -2,7 +2,7 @@ use anyhow::Result; use strum_macros::{Display, EnumIter, EnumString}; use crate::config::Colors; -use crate::event_exec::EventExec; +use crate::event_exec::{EventAction, LeaveMode}; use crate::status::Status; /// Different kind of action which can be mapped to a key. @@ -27,7 +27,6 @@ pub enum ActionMap { Delete, DeleteFile, Diff, - ToggleDisplayFull, DragNDrop, EncryptedDrive, End, @@ -36,8 +35,10 @@ pub enum ActionMap { Filter, FlagAll, FuzzyFind, - FuzzyFindLine, FuzzyFindHelp, + FuzzyFindLine, + GoRoot, + GoStart, Goto, Help, History, @@ -47,7 +48,12 @@ pub enum ActionMap { Log, MarksJump, MarksNew, - ModeNormal, + MediaInfo, + MocpAddToPlayList, + MocpGoToSong, + MocpNext, + MocpPrevious, + MocpTogglePause, MoveDown, MoveLeft, MoveRight, @@ -66,34 +72,32 @@ pub enum ActionMap { RefreshView, RegexMatch, Rename, + ResetMode, ReverseFlags, Search, SearchNext, SetWallpaper, Shell, + ShellCommand, ShellMenu, Shortcut, Sort, Symlink, Tab, - MocpAddToPlayList, - MocpGoToSong, - MocpTogglePause, - MocpNext, - MocpPrevious, - MediaInfo, + ToggleDisplayFull, ToggleDualPane, ToggleFlag, ToggleHidden, TogglePreviewSecond, - TrashMoveFile, - TrashRestoreFile, TrashEmpty, + TrashMoveFile, TrashOpen, + TrashRestoreFile, Tree, TreeFold, - TreeUnFoldAll, TreeFoldAll, + TreeUnFoldAll, + Custom(String), } impl ActionMap { @@ -101,89 +105,93 @@ impl ActionMap { /// Every Action links to a different `EventExec` method. pub fn matcher(&self, status: &mut Status, colors: &Colors) -> Result<()> { let current_tab = status.selected(); - match *self { - ActionMap::Back => EventExec::event_back(status, colors), - ActionMap::BackTab => EventExec::backtab(status), - ActionMap::Backspace => EventExec::event_backspace(status), - ActionMap::Bulk => EventExec::event_bulk(status), - ActionMap::Chmod => EventExec::event_chmod(status), - ActionMap::ClearFlags => EventExec::event_clear_flags(status), - ActionMap::CliInfo => EventExec::event_cli_info(status), - ActionMap::Command => EventExec::event_command(current_tab), - ActionMap::Compress => EventExec::event_compress(status), - ActionMap::CopyFilename => EventExec::event_copy_filename(status), - ActionMap::CopyFilepath => EventExec::event_copy_filepath(status), - ActionMap::CopyPaste => EventExec::event_copy_paste(status), - ActionMap::CutPaste => EventExec::event_cut_paste(status), - ActionMap::Delete => EventExec::event_delete(status), - ActionMap::DeleteFile => EventExec::event_delete_file(status), - ActionMap::Diff => EventExec::event_diff(status), - ActionMap::ToggleDisplayFull => EventExec::event_toggle_display_full(status), - ActionMap::DragNDrop => EventExec::event_drag_n_drop(status), - ActionMap::EncryptedDrive => EventExec::event_encrypted_drive(status), - ActionMap::End => EventExec::event_end(status, colors), - ActionMap::Enter => EventExec::event_enter(status, colors), - ActionMap::Exec => EventExec::event_exec(current_tab), - ActionMap::Filter => EventExec::event_filter(current_tab), - ActionMap::FlagAll => EventExec::event_flag_all(status), - ActionMap::FuzzyFind => EventExec::event_fuzzyfind(status), - ActionMap::FuzzyFindLine => EventExec::event_fuzzyfind_line(status), - ActionMap::FuzzyFindHelp => EventExec::event_fuzzyfind_help(status), - ActionMap::Goto => EventExec::event_goto(current_tab), - ActionMap::Help => EventExec::event_help(status), - ActionMap::Log => EventExec::event_log(current_tab), - ActionMap::History => EventExec::event_history(current_tab), - ActionMap::Home => EventExec::event_home(current_tab), - ActionMap::MocpAddToPlayList => EventExec::event_mocp_add_to_playlist(current_tab), - ActionMap::MocpGoToSong => EventExec::event_mocp_go_to_song(current_tab), - ActionMap::MocpTogglePause => EventExec::event_mocp_toggle_pause(status), - ActionMap::MocpNext => EventExec::event_mocp_next(), - ActionMap::MocpPrevious => EventExec::event_mocp_previous(), - ActionMap::Jump => EventExec::event_jump(status), - ActionMap::KeyHome => EventExec::event_key_home(status, colors), - ActionMap::MarksJump => EventExec::event_marks_jump(status), - ActionMap::MarksNew => EventExec::event_marks_new(current_tab), - ActionMap::ModeNormal => EventExec::event_reset_mode(current_tab), - ActionMap::MoveDown => EventExec::event_move_down(status, colors), - ActionMap::MoveLeft => EventExec::event_move_left(status, colors), - ActionMap::MoveRight => EventExec::event_move_right(status, colors), - ActionMap::MoveUp => EventExec::event_move_up(status, colors), - ActionMap::NewDir => EventExec::event_new_dir(current_tab), - ActionMap::NewFile => EventExec::event_new_file(current_tab), - ActionMap::NvimFilepicker => EventExec::event_nvim_filepicker(status), - ActionMap::NvimSetAddress => EventExec::event_set_nvim_server(status), - ActionMap::OpenFile => EventExec::event_open_file(status), - ActionMap::PageDown => EventExec::event_page_down(status, colors), - ActionMap::PageUp => EventExec::event_page_up(status, colors), - ActionMap::Preview => EventExec::event_preview(status, colors), - ActionMap::Quit => EventExec::event_quit(current_tab), - ActionMap::RefreshView => EventExec::event_refreshview(status, colors), - ActionMap::RegexMatch => EventExec::event_regex_match(current_tab), - ActionMap::Rename => EventExec::event_rename(current_tab), - ActionMap::ReverseFlags => EventExec::event_reverse_flags(status), - ActionMap::Search => EventExec::event_search(current_tab), - ActionMap::SearchNext => EventExec::event_search_next(current_tab), - ActionMap::SetWallpaper => EventExec::event_set_wallpaper(current_tab), - ActionMap::Shell => EventExec::event_shell(status), - ActionMap::ShellMenu => EventExec::event_shell_menu(current_tab), - ActionMap::Shortcut => EventExec::event_shortcut(current_tab), - ActionMap::Sort => EventExec::event_sort(current_tab), - ActionMap::Symlink => EventExec::event_symlink(status), - ActionMap::Tab => EventExec::event_tab(status), - ActionMap::MediaInfo => EventExec::event_mediainfo(current_tab), - ActionMap::ToggleDualPane => EventExec::event_toggle_dualpane(status), - ActionMap::ToggleFlag => EventExec::event_toggle_flag(status), - ActionMap::ToggleHidden => EventExec::event_toggle_hidden(status, colors), - ActionMap::TogglePreviewSecond => EventExec::event_toggle_preview_second(status), - ActionMap::TrashMoveFile => EventExec::event_trash_move_file(status), - ActionMap::TrashRestoreFile => EventExec::event_trash_restore_file(status), - ActionMap::TrashEmpty => EventExec::event_trash_empty(status), - ActionMap::TrashOpen => EventExec::event_trash_open(status), - ActionMap::Tree => EventExec::event_tree(status, colors), - ActionMap::TreeFold => EventExec::event_tree_fold(current_tab, colors), - ActionMap::TreeFoldAll => EventExec::event_tree_fold_all(current_tab, colors), - ActionMap::TreeUnFoldAll => EventExec::event_tree_unfold_all(current_tab, colors), - ActionMap::OpenConfig => EventExec::event_open_config(status), + match self { + ActionMap::Back => EventAction::back(status, colors), + ActionMap::BackTab => EventAction::backtab(st |