diff options
author | qkzk <qkzk@users.noreply.github.com> | 2023-12-12 21:41:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 21:41:39 +0100 |
commit | 1df94a5fe4fb781b6d207bc35759348b3d8ad86a (patch) | |
tree | eec2b9461c74d8ae0e3f2cf8a210e00d7222e284 | |
parent | 527204946897d403cdcffc21914ff490dbd185fe (diff) | |
parent | 3ded042f88d2f4708b5ff3cd76df1bf43d31b1e8 (diff) |
Merge pull request #86 from qkzk/v0.1.24-use_rcv0.1.24
V0.1.24
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Cargo.lock | 3 | ||||
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | config_files/fm/config.yaml | 51 | ||||
-rw-r--r-- | config_files/fm/logging_config.yaml | 6 | ||||
-rw-r--r-- | config_files/fm/opener.yaml | 9 | ||||
-rw-r--r-- | config_files/fm/session.yaml | 3 | ||||
-rw-r--r-- | config_files/fm/tuis.yaml | 7 | ||||
-rw-r--r-- | development.md | 101 | ||||
-rw-r--r-- | fm.gif | bin | 8507103 -> 0 bytes | |||
-rw-r--r-- | readme.md | 256 | ||||
-rw-r--r-- | src/action_map.rs | 206 | ||||
-rw-r--r-- | src/app/application.rs (renamed from src/app.rs) | 89 | ||||
-rw-r--r-- | src/app/header_footer.rs | 263 | ||||
-rw-r--r-- | src/app/internal_settings.rs | 90 | ||||
-rw-r--r-- | src/app/mod.rs | 17 | ||||
-rw-r--r-- | src/app/refresher.rs (renamed from src/refresher.rs) | 9 | ||||
-rw-r--r-- | src/app/session.rs | 155 | ||||
-rw-r--r-- | src/app/status.rs | 995 | ||||
-rw-r--r-- | src/app/tab.rs | 725 | ||||
-rw-r--r-- | src/bulkrename.rs | 245 | ||||
-rw-r--r-- | src/cli_info.rs | 74 | ||||
-rw-r--r-- | src/common/constant_strings_paths.rs (renamed from src/constant_strings_paths.rs) | 55 | ||||
-rw-r--r-- | src/common/mod.rs | 5 | ||||
-rw-r--r-- | src/common/utils.rs (renamed from src/utils.rs) | 69 | ||||
-rw-r--r-- | src/config/colors.rs (renamed from src/colors.rs) | 0 | ||||
-rw-r--r-- | src/config/configuration.rs (renamed from src/config.rs) | 49 | ||||
-rw-r--r-- | src/config/keybindings.rs (renamed from src/keybindings.rs) | 64 | ||||
-rw-r--r-- | src/config/mod.rs | 7 | ||||
-rw-r--r-- | src/event/action_map.rs | 206 | ||||
-rw-r--r-- | src/event/event_dispatch.rs | 107 | ||||
-rw-r--r-- | src/event/event_exec.rs | 1023 | ||||
-rw-r--r-- | src/event/event_poller.rs | 23 | ||||
-rw-r--r-- | src/event/mod.rs | 9 | ||||
-rw-r--r-- | src/event_dispatch.rs | 93 | ||||
-rw-r--r-- | src/event_exec.rs | 1561 | ||||
-rw-r--r-- | src/fileinfo.rs | 784 | ||||
-rw-r--r-- | src/io/args.rs (renamed from src/args.rs) | 12 | ||||
-rw-r--r-- | src/io/commands.rs | 326 | ||||
-rw-r--r-- | src/io/display.rs | 1342 | ||||
-rw-r--r-- | src/io/git.rs (renamed from src/git.rs) | 25 | ||||
-rw-r--r-- | src/io/log.rs (renamed from src/log.rs) | 62 | ||||
-rw-r--r-- | src/io/mod.rs | 13 | ||||
-rw-r--r-- | src/io/opener.rs | 386 | ||||
-rw-r--r-- | src/lib.rs | 51 | ||||
-rw-r--r-- | src/mode.rs | 234 | ||||
-rw-r--r-- | src/modes/display/content_window.rs (renamed from src/content_window.rs) | 4 | ||||
-rw-r--r-- | src/modes/display/directory.rs | 340 | ||||
-rw-r--r-- | src/modes/display/fileinfo.rs | 451 | ||||
-rw-r--r-- | src/modes/display/mod.rs | 21 | ||||
-rw-r--r-- | src/modes/display/preview.rs (renamed from src/preview.rs) | 186 | ||||
-rw-r--r-- | src/modes/display/skim.rs (renamed from src/skim.rs) | 6 | ||||
-rw-r--r-- | src/modes/display/tree.rs | 808 | ||||
-rw-r--r-- | src/modes/display/users.rs | 41 | ||||
-rw-r--r-- | src/modes/edit/bulkrename.rs | 237 | ||||
-rw-r--r-- | src/modes/edit/cli_menu.rs | 105 | ||||
-rw-r--r-- | src/modes/edit/completion.rs (renamed from src/completion.rs) | 72 | ||||
-rw-r--r-- | src/modes/edit/compress.rs (renamed from src/compress.rs) | 49 | ||||
-rw-r--r-- | src/modes/edit/context.rs | 44 | ||||
-rw-r--r-- | src/modes/edit/copy_move.rs (renamed from src/copy_move.rs) | 104 | ||||
-rw-r--r-- | src/modes/edit/cryptsetup.rs (renamed from src/cryptsetup.rs) | 123 | ||||
-rw-r--r-- | src/modes/edit/decompress.rs (renamed from src/decompress.rs) | 38 | ||||
-rw-r--r-- | src/modes/edit/filter.rs (renamed from src/filter.rs) | 20 | ||||
-rw-r--r-- | src/modes/edit/flagged.rs (renamed from src/flagged.rs) | 10 | ||||
-rw-r--r-- | src/modes/edit/help.rs (renamed from src/help.rs) | 71 | ||||
-rw-r--r-- | src/modes/edit/history.rs (renamed from src/history.rs) | 7 | ||||
-rw-r--r-- | src/modes/edit/input.rs (renamed from src/input.rs) | 67 | ||||
-rw-r--r-- | src/modes/edit/iso.rs (renamed from src/iso.rs) | 76 | ||||
-rw-r--r-- | src/modes/edit/leave_mode.rs | 468 | ||||
-rw-r--r-- | src/modes/edit/line_display.rs | 86 | ||||
-rw-r--r-- | src/modes/edit/marks.rs (renamed from src/marks.rs) | 53 | ||||
-rw-r--r-- | src/modes/edit/menu.rs | 271 | ||||
-rw-r--r-- | src/modes/edit/mocp.rs (renamed from src/mocp.rs) | 56 | ||||
-rw-r--r-- | src/modes/edit/mod.rs | 67 | ||||
-rw-r--r-- | src/modes/edit/mount_help.rs | 62 | ||||
-rw-r--r-- | src/modes/edit/node_creation.rs | 66 | ||||
-rw-r--r-- | src/modes/edit/nvim.rs (renamed from src/nvim.rs) | 0 | ||||
-rw-r--r-- | src/modes/edit/password.rs | 80 | ||||
-rw-r--r-- | src/modes/edit/permissions.rs | 96 | ||||
-rw-r--r-- | src/modes/edit/regex.rs | 23 | ||||
-rw-r--r-- | src/modes/edit/removable_devices.rs (renamed from src/removable_devices.rs) | 101 | ||||
-rw-r--r-- | src/modes/edit/selectable_content.rs (renamed from src/selectable_content.rs) | 30 | ||||
-rw-r--r-- | src/modes/edit/shell_parser.rs (renamed from src/shell_parser.rs) | 54 | ||||
-rw-r--r-- | src/modes/edit/shortcut.rs (renamed from src/shortcut.rs) | 35 | ||||
-rw-r--r-- | src/modes/edit/sort.rs (renamed from src/sort.rs) | 33 | ||||
-rw-r--r-- | src/modes/edit/trash.rs (renamed from src/trash.rs) | 156 | ||||
-rw-r--r-- | src/modes/edit/tui_menu.rs | 125 | ||||
-rw-r--r-- | src/modes/mod.rs | 7 | ||||
-rw-r--r-- | src/modes/mode.rs | 292 | ||||
-rw-r--r-- | src/mount_help.rs | 27 | ||||
-rw-r--r-- | src/opener.rs | 559 | ||||
-rw-r--r-- | src/password.rs | 200 | ||||
-rw-r--r-- | src/shell_menu.rs | 96 | ||||
-rw-r--r-- | src/status.rs | 1087 | ||||
-rw-r--r-- | src/tab.rs | 726 | ||||
-rw-r--r-- | src/term_manager.rs | 1202 | ||||
-rw-r--r-- | src/tree.rs | 595 | ||||
-rw-r--r-- | src/users.rs | 101 |
98 files changed, 10641 insertions, 8809 deletions
@@ -2,3 +2,4 @@ *.log *.vimspector* *compress_example +*nohup* @@ -797,7 +797,7 @@ dependencies = [ [[package]] name = "fm-tui" -version = "0.1.23" +version = "0.1.24" dependencies = [ "anyhow", "cairo-rs", @@ -819,6 +819,7 @@ dependencies = [ "regex", "rust-lzma", "sanitize-filename", + "serde", "serde_yaml 0.9.27", "shellexpand", "skim-qkzk", @@ -1,6 +1,6 @@ [package] name = "fm-tui" -version = "0.1.23" +version = "0.1.24" authors = ["Quentin Konieczko <qu3nt1n@gmail.com>"] edition = "2021" license-file = "LICENSE.txt" @@ -12,7 +12,7 @@ categories = ["command-line-utilities", "filesystem", "os::unix-apis"] documentation = "https://docs.rs/fm-tui/latest/" [profile.release] -strip = true # Automatically strip symbols from the binary. +# strip = true # Automatically strip symbols from the binary. lto = true # instructs the linker to optimize at the link stage. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -49,6 +49,7 @@ rand = "0.8.5" regex = "1.6.0" rust-lzma = "0.5.1" sanitize-filename = "0.4.0" +serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9.13" shellexpand = "2.1.2" skim-qkzk = "0.9.12" diff --git a/config_files/fm/config.yaml b/config_files/fm/config.yaml index 702e9b4..8560b1c 100644 --- a/config_files/fm/config.yaml +++ b/config_files/fm/config.yaml @@ -1,9 +1,18 @@ +# fm configuration file. +# Each variable is explained below + + # the terminal emulator, which must be accessible from $PATH terminal: st + # configurable colors -# palette of the normal files. Accepted values are "red-green", "red-blue" and "green-blue" + +# Define a palette for the "normal" files. +# Accepted values are "red-green", "red-blue" and "green-blue" # other value will lead to the default palette which is "green-blue". palette: green-blue + +# Colors for "non normal" files. The list is below. colors: # you can define an ANSI color or an rgb color for any kind of file except "normal" files. # colors for normal files are calculated on the fly. @@ -18,7 +27,9 @@ colors: socket: cyan symlink: magenta broken: light_magenta + # keybindings +# # You can bind any key to any action. # List of valid actions is accessible from `help` (default key H) and from the readme.md file. # Invalid actions are skipped. @@ -53,7 +64,6 @@ keys: 'j': MoveDown 'k': MoveUp 'l': MoveRight - 'm': Chmod 'n': NewFile 'o': OpenFile 'p': CutPaste @@ -63,45 +73,34 @@ keys: 't': Tree 'u': ClearFlags 'v': ReverseFlags - 'w': RegexMatch 'x': DeleteFile - 'alt-d': DragNDrop - 'alt-e': ToggleDisplayFull - 'alt-f': ToggleDualPane + 'w': RegexMatch + 'alt-b': Bulk + 'alt-d': ToggleDualPane + 'alt-e': EncryptedDrive + 'alt-f': Filter 'alt-g': Goto + 'alt-m': Chmod 'alt-p': TogglePreviewSecond 'ctrl-c': CopyFilename - 'ctrl-e': EncryptedDrive 'ctrl-f': FuzzyFind + 'ctrl-h': Help 'ctrl-g': Shortcut 'ctrl-p': CopyFilepath 'ctrl-q': ResetMode 'ctrl-r': RefreshView - 'shift-b': Bulk - 'shift-f': Filter + 'shift-e': ToggleDisplayFull 'shift-g': End - 'shift-h': Help 'shift-L': Symlink 'shift-m': MarksNew 'shift-o': Sort 'shift-p': Preview - 'shift-t': MediaInfo -# display settings -settings: - # display all files ? - all: false - # use a second pane (if the terminal is wide enough) ? - dual: true - # display metadata ? - full: true - # use second pane for preview ? - preview: false # Custom command : -# * Use an unused keybind +# * Use a free 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 : +# * You can use expansions : # Expansions : # - %s: the full path of the currently selected file or folder, # - %f: the list of the full paths of the flagged files. @@ -109,6 +108,10 @@ settings: # - %n: the filename only. # - %p: the full path of the current directory. # Example: -# 'alt-u': "/usr/bin/ls %f" +# 'alt-u': "/usr/bin/ls %f" # will run `ls /path/to/the/selected/file`... be won't print anything. custom: + # open the selected file with chrome 'alt-u': "/usr/bin/google-chrome-stable %s" + 'shift-d': "/usr/bin/dragon-drop %s" + + diff --git a/config_files/fm/logging_config.yaml b/config_files/fm/logging_config.yaml index aad9f10..8fa538a 100644 --- a/config_files/fm/logging_config.yaml +++ b/config_files/fm/logging_config.yaml @@ -1,9 +1,11 @@ appenders: + # DO NOT EDIT + # THIS IS READ BY `rustc` DURING COMPILATION normal_logger: kind: rolling_file path: "$ENV{HOME}/.config/fm/log/fm.log" encoder: - pattern: "{d(%Y-%m-%d %H:%M:%S)} - {h({l})}: {m} - {f}:{L}{n}" + pattern: "{d(%Y-%m-%d %H:%M:%S)} - {m}{n}" policy: trigger: kind: size @@ -14,7 +16,7 @@ appenders: kind: rolling_file path: "$ENV{HOME}/.config/fm/log/action_logger.log" encoder: - pattern: "{d(%Y-%m-%d %H:%M:%S)} - {h({l})}: {m}{n}" + pattern: "{d(%Y-%m-%d %H:%M:%S)} - {m}{n}" policy: trigger: kind: size diff --git a/config_files/fm/opener.yaml b/config_files/fm/opener.yaml index 78dc6df..60f6621 100644 --- a/config_files/fm/opener.yaml +++ b/config_files/fm/opener.yaml @@ -1,3 +1,12 @@ +# Here you can configure which application is used to open your files. +# Each kind of files is matched by its extension. +# Every kind is listed below. The opener should be in your `$PATH`. +# The `use_term` boolean is set to true if the application requires to be +# run from the terminal, like `nvim`, false if it can be launched directly. +# Let say you want to open text file with vscode, then: +# text: +# opener: code +# use_term: false default: opener: xdg-open use_term: false diff --git a/config_files/fm/session.yaml b/config_files/fm/session.yaml new file mode 100644 index 0000000..c31f7a1 --- /dev/null +++ b/config_files/fm/session.yaml @@ -0,0 +1,3 @@ +dual: true +metadata: true +preview: false diff --git a/config_files/fm/tuis.yaml b/config_files/fm/tuis.yaml index c393a9d..b471223 100644 --- a/config_files/fm/tuis.yaml +++ b/config_files/fm/tuis.yaml @@ -1,3 +1,10 @@ +# Here you can configure which Terminal User Interface application you want to +# be able to load from the application itself. +# Each application should be reachable from your `$PATH`. +# The `cwd` boolean, which is required must be set to true +# if the application requires a working directory, like `lazygit`. +# It can be set to false for applications that don't care about where +# they're started from, like `htop`. lazygit: cwd: true ncdu: diff --git a/development.md b/development.md index c967e89..fe266b6 100644 --- a/development.md +++ b/development.md @@ -1,4 +1,6 @@ -# FM : Dired like File Manager +# Development + +I write every step in this file. ## DONE @@ -623,8 +625,101 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. ## Current dev +### Version 0.1.24 + +#### Summary + +- New Context Menu (right click, Alt+t) with basic file operations. +- Header (path, filename), Footer (other informations). +- Every window can be clicked. Header, Footer, Files, Menus. Selectable element from menu can be clicked. +- Integrated a lot of commands into `TuiApplications` or `CliApplications`. +- Session for display settings. Settings are saved after each modification. +- Better (?) keybindings. Alt+char open a menu whose name starts with this char. +- Refactoring `lib`. Moved file to a few folders, separated display from status. +- Many bug fixes + +#### Changelog |