From 0d2c11092d7da6e2dc163e2d169469953c208b42 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Sun, 12 May 2024 11:47:30 +0200 Subject: [PATCH 1/4] chore: fix typos --- CONTRIBUTING.md | 2 +- changelog.md | 4 ++-- src/internal/config_type.go | 8 ++++---- src/internal/default_config.go | 8 ++++---- src/internal/file_operations_extract.go | 2 +- src/internal/handle_file_operations.go | 6 +++--- src/internal/handle_panel_navigation.go | 2 +- src/internal/model_render.go | 2 +- src/internal/style_function.go | 2 +- src/superfile/hotkeys.toml | 8 ++++---- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eee47d3d..c5a41a32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ If there is an issue you think you can solve, and want to solve, then you should In that repository you should create a new branch for the issue you are working on and commit changes there. When the issue is solved and you want it to be integrated into the official repository, you may create a pull request for the same. The description of the pull request should clearly describe both the issue and the solution along with other necessary information. -The devlopers will merge after making the necessary changes (if arises a need to do so). +The developers will merge after making the necessary changes (if arises a need to do so). ### Do you want to add a new theme? diff --git a/changelog.md b/changelog.md index 02e90827..fa052d1b 100644 --- a/changelog.md +++ b/changelog.md @@ -65,7 +65,7 @@ All notable changes to this project will be documented in this file. Dates are d - Fix interface lag when selecting zip files or large files [`#29`](https://github.com/MHNightCat/superfile/issues/29) - Fix external media error [`#46`](https://github.com/MHNightCat/superfile/pull/46) -- Fix cant find trash can folder [`396674f`](https://github.com/MHNightCat/superfile/commit/396674f33e302369790bcb88d84df0d3830d3543) +- Fix can't find trash can folder [`396674f`](https://github.com/MHNightCat/superfile/commit/396674f33e302369790bcb88d84df0d3830d3543) - Fix Crashes when truncating metadata [`#50`](https://github.com/MHNightCat/superfile/issues/50) # [**v1.0.1**](https://github.com/MHNightCat/superfile/releases/tag/v1.0.1) @@ -94,7 +94,7 @@ All notable changes to this project will be documented in this file. Dates are d - Auto download folder [`96a3a71`](https://github.com/MHNightCat/superfile/commit/96a3a7108eb7c4327bad3424ed55e472ec78049f) - Auto initialize configuration [`96a3a71`](https://github.com/MHNightCat/superfile/commit/96a3a7108eb7c4327bad3424ed55e472ec78049f) -- Add version subcommand [`ee22df3`](https://github.com/MHNightCat/superfile/commit/ee22df3c7700adddb859ada8623f6c8b038e8087) +- Add version sub-command [`ee22df3`](https://github.com/MHNightCat/superfile/commit/ee22df3c7700adddb859ada8623f6c8b038e8087) ##### Bug fix diff --git a/src/internal/config_type.go b/src/internal/config_type.go index 814dd4a5..a6ebf565 100644 --- a/src/internal/config_type.go +++ b/src/internal/config_type.go @@ -129,13 +129,13 @@ type ConfigType struct { } type HotkeysType struct { - Confirm []string `toml:"confirm" comment:"=================================================================================================\nHere is global, all global key cant conflicts with other hotkeys"` + Confirm []string `toml:"confirm" comment:"=================================================================================================\nHere is global, all global key can't conflicts with other hotkeys"` Quit []string `toml:"quit"` // movement ListUp []string `toml:"list_up" comment:"movement"` ListDown []string `toml:"list_down"` - CloseFilePanel []string `toml:"close_file_panel" comment:"file panel controll"` + CloseFilePanel []string `toml:"close_file_panel" comment:"file panel control"` CreateNewFilePanel []string `toml:"create_new_file_panel"` NextFilePanel []string `toml:"next_file_panel"` PreviousFilePanel []string `toml:"previous_file_panel"` @@ -166,10 +166,10 @@ type HotkeysType struct { ConfirmTyping []string `toml:"confirm_typing" comment:"=================================================================================================\nHere is typing hotkey can conflict with all hotkeys"` CancelTyping []string `toml:"cancel_typing"` - ParentDirectory []string `toml:"parent_directory" comment:"=================================================================================================\nHere is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)"` + ParentDirectory []string `toml:"parent_directory" comment:"=================================================================================================\nHere is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey)"` SearchBar []string `toml:"search_bar"` - FilePanelSelectModeItemsSelectDown []string `toml:"file_panel_select_mode_items_select_down" comment:"=================================================================================================\nHere is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)"` + FilePanelSelectModeItemsSelectDown []string `toml:"file_panel_select_mode_items_select_down" comment:"=================================================================================================\nHere is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey)"` FilePanelSelectModeItemsSelectUp []string `toml:"file_panel_select_mode_items_select_up"` FilePanelSelectAllItem []string `toml:"file_panel_select_all_items"` } diff --git a/src/internal/default_config.go b/src/internal/default_config.go index 0a756b69..95be00e7 100644 --- a/src/internal/default_config.go +++ b/src/internal/default_config.go @@ -1,13 +1,13 @@ package internal var HotkeysTomlString string = `# ================================================================================================= -# Here is global, all global key cant conflicts with other hotkeys +# Here is global, all global key can't conflicts with other hotkeys confirm = ['enter', 'l'] quit = ['q', 'esc'] # (q)uit # movement list_up = ['up', 'k'] # most user use list_down = ['down', 'j'] # most user use -# file panel controll +# file panel control close_file_panel = ['w', ''] create_new_file_panel = ['n', ''] # (n)ew file panel next_file_panel = ['tab', 'L'] @@ -40,11 +40,11 @@ open_help_menu = ['?', ''] confirm_typing = ['enter', ''] cancel_typing = ['ctrl+c', 'esc'] # ================================================================================================= -# Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) parent_directory = ['h', 'backspace'] search_bar = ['/', ''] # ================================================================================================= -# Here is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) file_panel_select_mode_items_select_down = ['shift+down', 'J'] file_panel_select_mode_items_select_up = ['shift+up', 'K'] file_panel_select_all_items = ['A', ''] diff --git a/src/internal/file_operations_extract.go b/src/internal/file_operations_extract.go index 83d3d4a7..891818fd 100644 --- a/src/internal/file_operations_extract.go +++ b/src/internal/file_operations_extract.go @@ -72,7 +72,7 @@ func unzip(src, dest string) error { } }() totalFiles := len(r.File) - // progessbar + // progressbar prog := progress.New(generateGradientColor()) prog.PercentageStyle = footerStyle // channel message diff --git a/src/internal/handle_file_operations.go b/src/internal/handle_file_operations.go index 76b16c30..c26861f1 100644 --- a/src/internal/handle_file_operations.go +++ b/src/internal/handle_file_operations.go @@ -579,7 +579,7 @@ func extractFile(m model) model { outputDir, err = renameIfDuplicate(outputDir) if err != nil { - outPutLog("Error extract file when craete new directory", err) + outPutLog("Error extract file when create new directory", err) } switch ext { @@ -609,7 +609,7 @@ func compressFile(m model) model { zipName, err := renameIfDuplicate(zipName) if err != nil { - outPutLog("Error compress file when rename dublicate", err) + outPutLog("Error compress file when rename duplicate", err) } zipSource(panel.element[panel.cursor].location, filepath.Join(filepath.Dir(panel.element[panel.cursor].location), zipName)) @@ -633,7 +633,7 @@ func openFileWithEditor(m model) tea.Cmd { }) } -// Open directory with defailt editor +// Open directory with default editor func openDirectoryWithEditor(m model) tea.Cmd { editor := os.Getenv("EDITOR") m.editorMode = true diff --git a/src/internal/handle_panel_navigation.go b/src/internal/handle_panel_navigation.go index 2f98b7c3..46e72ced 100644 --- a/src/internal/handle_panel_navigation.go +++ b/src/internal/handle_panel_navigation.go @@ -135,7 +135,7 @@ func focusOnProcessBar(m model) model { return m } -// focus on meatadata +// focus on metadata func focusOnMetadata(m model) model { if m.focusPanel == metadataFocus { m.focusPanel = nonePanelFocus diff --git a/src/internal/model_render.go b/src/internal/model_render.go index 517f866a..40bdcb3c 100644 --- a/src/internal/model_render.go +++ b/src/internal/model_render.go @@ -120,7 +120,7 @@ func filePanelRender(m model) string { } } - // file panel render togther + // file panel render together filePanelRender := "" for _, f := range f { filePanelRender = lipgloss.JoinHorizontal(lipgloss.Top, filePanelRender, f) diff --git a/src/internal/style_function.go b/src/internal/style_function.go index b446fa85..357dce49 100644 --- a/src/internal/style_function.go +++ b/src/internal/style_function.go @@ -179,7 +179,7 @@ func stringColorRender(fgColor lipgloss.Color, bgColor lipgloss.Color) lipgloss. Background(bgColor) } -// Geerate border style +// Generate border style func generateBorder() lipgloss.Border { return lipgloss.Border{ Top: Config.BorderTop, diff --git a/src/superfile/hotkeys.toml b/src/superfile/hotkeys.toml index 05ae376f..86e3edce 100644 --- a/src/superfile/hotkeys.toml +++ b/src/superfile/hotkeys.toml @@ -1,11 +1,11 @@ # ================================================================================================= -# Here is global, all global key cant conflicts with other hotkeys +# Here is global, all global key can't conflicts with other hotkeys confirm = ['enter', 'l'] quit = ['q', 'esc'] # (q)uit # movement list_up = ['up', 'k'] # most user use list_down = ['down', 'j'] # most user use -# file panel controll +# file panel control close_file_panel = ['w', ''] create_new_file_panel = ['n', ''] # (n)ew file panel next_file_panel = ['tab', 'L'] @@ -38,11 +38,11 @@ open_help_menu = ['?', ''] confirm_typing = ['enter', ''] cancel_typing = ['ctrl+c', 'esc'] # ================================================================================================= -# Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) parent_directory = ['h', 'backspace'] search_bar = ['/', ''] # ================================================================================================= -# Here is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) file_panel_select_mode_items_select_down = ['shift+down', 'J'] file_panel_select_mode_items_select_up = ['shift+up', 'K'] file_panel_select_all_items = ['A', ''] From 82b73c92f84cbd2c81280bd990581458f9a8e609 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Sun, 12 May 2024 11:47:50 +0200 Subject: [PATCH 2/4] chore: fix style, acronym and registered brands These brands should be written with this exact format: - macOS - GitHub --- CONTRIBUTING.md | 8 ++++---- README.md | 16 ++++++++-------- changelog.md | 10 +++++----- src/internal/handle_file_operations.go | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5a41a32..14336725 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ There are many ways to contribute to Superfile: - Adding a theme - Sharing an idea and working on it - Working on a feature with other contributors. -- And More... +- And More… To get started, take a look at the following sections. @@ -21,7 +21,7 @@ Firstly you should check if such an issue was previously opened/closed for your If there is an issue you think you can solve, and want to solve, then you should create a new fork of this repository. In that repository you should create a new branch for the issue you are working on and commit changes there. -When the issue is solved and you want it to be integrated into the official repository, you may create a pull request for the same. +When the issue is solved, and you want it to be integrated into the official repository, you may create a pull request for the same. The description of the pull request should clearly describe both the issue and the solution along with other necessary information. The developers will merge after making the necessary changes (if arises a need to do so). @@ -29,14 +29,14 @@ The developers will merge after making the necessary changes (if arises a need t Firstly check if the theme you want to add is not already added. If it is, then you work may go waste and be left redundant. If no such theme exists, then you may create your own theme. Following steps will guide you for it: -- As a template, copy an existing theme's json file to your theme and then do the customizations. This will reduce errors from your side and make your work easy. +- As a template, copy an existing theme's JSON file to your theme and then do the customizations. This will reduce errors from your side and make your work easy. - To tests your theme, go to `~/.config/superfile/config/config.json` and change `theme = "gruvbox"` to `theme = "YOUR_THEME_NAME"` - Make the changes you want and finish the theme. - Then you can open a pull request for the same and follow the steps described in the previous section. ### Do you want to share an idea? -Superfile welcomes new ideas. If you have an idea you should firstly check if a similar or identical idea was presented previously or not, or check thoroughly if the idea is already present in superfile. +Superfile welcomes new ideas. If you have an idea you should first check if a similar or identical idea was presented previously or not, or check thoroughly if the idea is already present in superfile. To share your idea you can open a discussion in https://github.com/MHNightCat/superfile/discussions There you can share your idea and if you want to work on it, you can follow the same steps as mentioned in previously. diff --git a/README.md b/README.md index 50d0a45e..e4f32de7 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ bash -c "$(wget -qO- https://raw.githubusercontent.com/MHNightCat/superfile/main
Click to expand

-#### Install with nix command line: +#### Install with nix command-line: ```bash nix profile install github:MHNightCat/superfile#superfile @@ -110,7 +110,7 @@ in { ### Font -> [!WARNING] +> [!WARNING] > This is a reminder that you must use a [Nerd font](https://www.nerdfonts.com/font-downloads) Once the font is installed if `superfile` isn't working make sure to update your terminal preferences to use the font. @@ -125,7 +125,7 @@ You can build the source code yourself by using these steps: **Build Steps** -Clone this repo using the following command: +Clone this repository using the following command: ``` git clone https://github.com/MHNightCat/superfile.git @@ -143,7 +143,7 @@ Run the `build.sh` file: ./build.sh ``` -Add the binary file to your $PATH, e.g. in `/usr/local/bin`: +Add the binary file to your $PATH, e.g., in `/usr/local/bin`: ```bash mv ./bin/spf /usr/local/bin @@ -169,7 +169,7 @@ After you install superfile, you can go [here](https://github.com/MHNightCat/sup You can go to [theme list](https://github.com/MHNightCat/superfile/blob/main/THEMELIST.md) to find one you like! -> We only have a few themes at the moment, but we will be making more over time! You can also [submit a pull request](https://github.com/MHNightCat/superfile/pulls) for your own theme! +> We only have a few themes at the moment, but we will be making more overtime! You can also [submit a pull request](https://github.com/MHNightCat/superfile/pulls) for your own theme! copy `theme_name` in: @@ -180,7 +180,7 @@ Theme name: theme_name Edit `config.toml` using your preferred editor: > [!TIP] -> If your os is MacOs the file path should be in the `~/Library/Application Support/superfile/config.toml` +> If your OS is macOS the file path should be in the `~/Library/Application Support/superfile/config.toml` ``` $EDITOR ~/.config/superfile/config.toml @@ -212,7 +212,7 @@ Don't forget to change the `theme` variable in `config.toml` to your theme name. [**Click me to see the hotkey list**](https://github.com/MHNightCat/superfile/wiki/Hotkey-list) > [!TIP] -> If your os is MacOs the file path should be in the `~/Library/Application Support/superfile/hotkeys.toml` +> If your OS is macOS the file path should be in the `~/Library/Application Support/superfile/hotkeys.toml` **You can change all hotkeys in** `~/.config/superfile/hotkeys.toml` @@ -230,7 +230,7 @@ If you want to contribute please follow the [contribution guide](./CONTRIBUTING. ### Support -- a Star on my Github repos would be nice 🌟 +- a Star on my GitHub repository would be nice 🌟 - You can buy a coffee for me πŸ’– [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G1JEGGC) diff --git a/changelog.md b/changelog.md index fa052d1b..54c59a3b 100644 --- a/changelog.md +++ b/changelog.md @@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file. Dates are d - Make downloading theme files optional [`7fa775d`](https://github.com/MHNightCat/superfile/commit/7fa775dd7db175fef694e514bd77ebd75c801fae) #### Bug fix -- Recursive symlink crashes superfile [`#109`](https://github.com/MHNightCat/superfile/issues/109) +- Recursive symlink crashes superfile [`#109`](https://github.com/MHNightCat/superfile/issues/109) # [**v1.1.2**](https://github.com/MHNightCat/superfile/releases/tag/v1.1.2) @@ -26,7 +26,7 @@ All notable changes to this project will be documented in this file. Dates are d - Support transparent background [`4108d40`](https://github.com/MHNightCat/superfile/commit/4108d40bc0b93656eca2da98253a83dbc0cb27a9) - Support custom border style [`6ff0576`](https://github.com/MHNightCat/superfile/commit/6ff05765823cbd25e6fdc4d3f7370e435114acbb) - Enhancement when cutting and pasting, the file should be moved instead of copied and deleted. [`#100`](https://github.com/MHNightCat/superfile/issues/100) -- Support extract almose compressed file [`e57cb78`](https://github.com/MHNightCat/superfile/commit/e57cb78d602d62b47662e2069b75059d908147db) +- Support extract almost compression formats [`e57cb78`](https://github.com/MHNightCat/superfile/commit/e57cb78d602d62b47662e2069b75059d908147db) - Update XDG_CACHE to XDG_STATE_HOME [`#90`](https://github.com/MHNightCat/superfile/issues/90) #### Bug fix @@ -42,7 +42,7 @@ All notable changes to this project will be documented in this file. Dates are d - Auto update config file if missing config [`1498c92`](https://github.com/MHNightCat/superfile/commit/1498c92d2166c8c25989be9ce5a15dc6d1ffb073) #### Bug fix -- key `l` deletes files in MacOs [`#72`](https://github.com/MHNightCat/superfile/issues/72) +- key `l` deletes files in macOs [`#72`](https://github.com/MHNightCat/superfile/issues/72) # [**v1.1.0**](https://github.com/MHNightCat/superfile/releases/tag/v1.1.0) @@ -52,7 +52,7 @@ All notable changes to this project will be documented in this file. Dates are d - Update data folder from `$XDG_CONFIG_HOME/superfile/data` to `$XDG_DATA_HOME/superfile` [`9fff97a`](https://github.com/MHNightCat/superfile/commit/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34) - Toggle dot file display [`9fff97a`](https://github.com/MHNightCat/superfile/commit/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34) -- Update log file from `$XDG_CONFIG_HOME/superfile/data/superfile.log` to `$XDG_CACH_DATA` [`#27`](https://github.com/MHNightCat/superfile/pull/27) +- Update log file from `$XDG_CONFIG_HOME/superfile/data/superfile.log` to `$XDG_CACHE_DATA` [`#27`](https://github.com/MHNightCat/superfile/pull/27) - Update theme background [`#42`](https://github.com/MHNightCat/superfile/pull/42) - Update unzip function [`#55`](https://github.com/MHNightCat/superfile/pull/55) - Update zip function [`60c490a`](https://github.com/MHNightCat/superfile/commit/60c490aa06019fb1a5382b1e241c6b0a72ec51a4) @@ -76,7 +76,7 @@ All notable changes to this project will be documented in this file. Dates are d - Update `$HOME/.superfile` to `$XDG_CONFIG_HOME/superfile` [`886dbfb`](https://github.com/MHNightCat/superfile/commit/886dbfb276407db36e9fb7369ec31053e7aabcf4) - Follow [The FreeDesktop.org Trash specification](https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html) to update the trash bin path in local path [`886dbfb`](https://github.com/MHNightCat/superfile/commit/886dbfb276407db36e9fb7369ec31053e7aabcf4) -- The external hard drive will be deleted directly ,But macOs for now not support trash can[`a4232a8`](https://github.com/MHNightCat/superfile/commit/a4232a88bef4b5c3e99456fd198eabb953dc324c) +- The external hard drive will be deleted directly ,But macOS for now not support trash can[`a4232a8`](https://github.com/MHNightCat/superfile/commit/a4232a88bef4b5c3e99456fd198eabb953dc324c) - The user can enter the path, which will be the path of the first file panel [`14620b3`](https://github.com/MHNightCat/superfile/commit/14620b33b09edfce80a95e1f52f7f66b3686a9d0) - Make user can open file with default browser text-editor etc [`f47d291`](https://github.com/MHNightCat/superfile/commit/f47d2915bf637da0cf99a4b15fa0bea8edc8d380) - Can open terminal in focused file panel path [`f47d291`](https://github.com/MHNightCat/superfile/commit/f47d2915bf637da0cf99a4b15fa0bea8edc8d380) diff --git a/src/internal/handle_file_operations.go b/src/internal/handle_file_operations.go index c26861f1..13e1a229 100644 --- a/src/internal/handle_file_operations.go +++ b/src/internal/handle_file_operations.go @@ -274,7 +274,7 @@ func completelyDeleteSingleItem(m model) model { return m } -// Completely delete all file or folder from clipbaord (Not move to the trash can) +// Completely delete all file or folder from clipboard (Not move to the trash can) func completelyDeleteMultipleItems(m model) model { panel := m.fileModel.filePanels[m.filePanelFocusIndex] if len(panel.selected) != 0 { From 255d7311027390a1c4748e69cb6740e2d58a683e Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Sun, 12 May 2024 11:54:11 +0200 Subject: [PATCH 3/4] chore: fix date format by switching to ISO 8601 YYYY/MM/DD is barely used, and only in: - Rwanda - Iran - Guinea - South Africa More information here https://en.wikipedia.org/wiki/List_of_date_formats_by_country --- changelog.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/changelog.md b/changelog.md index 54c59a3b..57c2d026 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. Dates are d # [**v1.1.3**]() -> xxxx/xx/xx +> xxxx-xx-xx #### Update - Update print path list [`37c8864`](https://github.com/MHNightCat/superfile/commit/37c8864eb2b0dc73fbf8928dd40b3b7573e9a11dw) @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file. Dates are d # [**v1.1.2**](https://github.com/MHNightCat/superfile/releases/tag/v1.1.2) -> 2024/05/08 +> 2024-05-08 #### Update - Update help menu [`#75`](https://github.com/MHNightCat/superfile/issues/75) @@ -35,18 +35,18 @@ All notable changes to this project will be documented in this file. Dates are d # [**v1.1.1**](https://github.com/MHNightCat/superfile/releases/tag/v1.1.1) -> 2024/04/23 +> 2024-04-23 #### Update - Open directory with default application [`#33`](https://github.com/MHNightCat/superfile/issues/33) - Auto update config file if missing config [`1498c92`](https://github.com/MHNightCat/superfile/commit/1498c92d2166c8c25989be9ce5a15dc6d1ffb073) #### Bug fix -- key `l` deletes files in macOs [`#72`](https://github.com/MHNightCat/superfile/issues/72) +- key `l` deletes files in macOS [`#72`](https://github.com/MHNightCat/superfile/issues/72) # [**v1.1.0**](https://github.com/MHNightCat/superfile/releases/tag/v1.1.0) -> 2024/04/20 +> 2024-04-20 #### Update @@ -70,7 +70,7 @@ All notable changes to this project will be documented in this file. Dates are d # [**v1.0.1**](https://github.com/MHNightCat/superfile/releases/tag/v1.0.1) -> 2024/04/08 +> 2024-04-08 #### Update @@ -88,7 +88,7 @@ All notable changes to this project will be documented in this file. Dates are d # [**v1.0.0**](https://github.com/MHNightCat/superfile/releases/tag/v1.0.0) -> 2024/04/06 +> 2024-04-06 ##### Update @@ -103,6 +103,6 @@ All notable changes to this project will be documented in this file. Dates are d # [**Beta 0.1.0**](https://github.com/MHNightCat/superfile/releases/tag/v0.1.0-beta) -> 2024/04/06 +> 2024-04-06 - FIRST RELEASE COME UP! NO ANY CHANGE From d48125050b9dbf753577d0b7d673fec92d53a3b5 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sun, 12 May 2024 18:54:19 +0800 Subject: [PATCH 4/4] Fix typos Found via `codespell -L aks` and `typos --hidden --format brief` --- CONTRIBUTING.md | 2 +- changelog.md | 4 ++-- src/internal/config_type.go | 8 ++++---- src/internal/default_config.go | 10 +++++----- src/internal/file_operations_extract.go | 2 +- src/internal/function.go | 4 ++-- src/internal/handle_file_operations.go | 8 ++++---- src/internal/handle_panel_movement.go | 6 +++--- src/internal/handle_panel_navigation.go | 2 +- src/internal/key_function.go | 4 ++-- src/internal/model_render.go | 14 +++++++------- src/internal/style.go | 4 ++-- src/internal/style_function.go | 2 +- src/superfile/hotkeys.toml | 8 ++++---- 14 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eee47d3d..c5a41a32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ If there is an issue you think you can solve, and want to solve, then you should In that repository you should create a new branch for the issue you are working on and commit changes there. When the issue is solved and you want it to be integrated into the official repository, you may create a pull request for the same. The description of the pull request should clearly describe both the issue and the solution along with other necessary information. -The devlopers will merge after making the necessary changes (if arises a need to do so). +The developers will merge after making the necessary changes (if arises a need to do so). ### Do you want to add a new theme? diff --git a/changelog.md b/changelog.md index 02e90827..2206cd09 100644 --- a/changelog.md +++ b/changelog.md @@ -52,7 +52,7 @@ All notable changes to this project will be documented in this file. Dates are d - Update data folder from `$XDG_CONFIG_HOME/superfile/data` to `$XDG_DATA_HOME/superfile` [`9fff97a`](https://github.com/MHNightCat/superfile/commit/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34) - Toggle dot file display [`9fff97a`](https://github.com/MHNightCat/superfile/commit/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34/9fff97a362bcd5bec1c19709b7a5aeb59cdeaa34) -- Update log file from `$XDG_CONFIG_HOME/superfile/data/superfile.log` to `$XDG_CACH_DATA` [`#27`](https://github.com/MHNightCat/superfile/pull/27) +- Update log file from `$XDG_CONFIG_HOME/superfile/data/superfile.log` to `$XDG_CACHE_DATA` [`#27`](https://github.com/MHNightCat/superfile/pull/27) - Update theme background [`#42`](https://github.com/MHNightCat/superfile/pull/42) - Update unzip function [`#55`](https://github.com/MHNightCat/superfile/pull/55) - Update zip function [`60c490a`](https://github.com/MHNightCat/superfile/commit/60c490aa06019fb1a5382b1e241c6b0a72ec51a4) @@ -65,7 +65,7 @@ All notable changes to this project will be documented in this file. Dates are d - Fix interface lag when selecting zip files or large files [`#29`](https://github.com/MHNightCat/superfile/issues/29) - Fix external media error [`#46`](https://github.com/MHNightCat/superfile/pull/46) -- Fix cant find trash can folder [`396674f`](https://github.com/MHNightCat/superfile/commit/396674f33e302369790bcb88d84df0d3830d3543) +- Fix can't find trash can folder [`396674f`](https://github.com/MHNightCat/superfile/commit/396674f33e302369790bcb88d84df0d3830d3543) - Fix Crashes when truncating metadata [`#50`](https://github.com/MHNightCat/superfile/issues/50) # [**v1.0.1**](https://github.com/MHNightCat/superfile/releases/tag/v1.0.1) diff --git a/src/internal/config_type.go b/src/internal/config_type.go index 814dd4a5..a6ebf565 100644 --- a/src/internal/config_type.go +++ b/src/internal/config_type.go @@ -129,13 +129,13 @@ type ConfigType struct { } type HotkeysType struct { - Confirm []string `toml:"confirm" comment:"=================================================================================================\nHere is global, all global key cant conflicts with other hotkeys"` + Confirm []string `toml:"confirm" comment:"=================================================================================================\nHere is global, all global key can't conflicts with other hotkeys"` Quit []string `toml:"quit"` // movement ListUp []string `toml:"list_up" comment:"movement"` ListDown []string `toml:"list_down"` - CloseFilePanel []string `toml:"close_file_panel" comment:"file panel controll"` + CloseFilePanel []string `toml:"close_file_panel" comment:"file panel control"` CreateNewFilePanel []string `toml:"create_new_file_panel"` NextFilePanel []string `toml:"next_file_panel"` PreviousFilePanel []string `toml:"previous_file_panel"` @@ -166,10 +166,10 @@ type HotkeysType struct { ConfirmTyping []string `toml:"confirm_typing" comment:"=================================================================================================\nHere is typing hotkey can conflict with all hotkeys"` CancelTyping []string `toml:"cancel_typing"` - ParentDirectory []string `toml:"parent_directory" comment:"=================================================================================================\nHere is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)"` + ParentDirectory []string `toml:"parent_directory" comment:"=================================================================================================\nHere is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey)"` SearchBar []string `toml:"search_bar"` - FilePanelSelectModeItemsSelectDown []string `toml:"file_panel_select_mode_items_select_down" comment:"=================================================================================================\nHere is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)"` + FilePanelSelectModeItemsSelectDown []string `toml:"file_panel_select_mode_items_select_down" comment:"=================================================================================================\nHere is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey)"` FilePanelSelectModeItemsSelectUp []string `toml:"file_panel_select_mode_items_select_up"` FilePanelSelectAllItem []string `toml:"file_panel_select_all_items"` } diff --git a/src/internal/default_config.go b/src/internal/default_config.go index 0a756b69..7e2c7671 100644 --- a/src/internal/default_config.go +++ b/src/internal/default_config.go @@ -1,13 +1,13 @@ package internal var HotkeysTomlString string = `# ================================================================================================= -# Here is global, all global key cant conflicts with other hotkeys +# Here is global, all global key can't conflicts with other hotkeys confirm = ['enter', 'l'] quit = ['q', 'esc'] # (q)uit # movement list_up = ['up', 'k'] # most user use list_down = ['down', 'j'] # most user use -# file panel controll +# file panel control close_file_panel = ['w', ''] create_new_file_panel = ['n', ''] # (n)ew file panel next_file_panel = ['tab', 'L'] @@ -40,11 +40,11 @@ open_help_menu = ['?', ''] confirm_typing = ['enter', ''] cancel_typing = ['ctrl+c', 'esc'] # ================================================================================================= -# Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) parent_directory = ['h', 'backspace'] search_bar = ['/', ''] # ================================================================================================= -# Here is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) file_panel_select_mode_items_select_down = ['shift+down', 'J'] file_panel_select_mode_items_select_up = ['shift+up', 'K'] file_panel_select_all_items = ['A', ''] @@ -59,7 +59,7 @@ footer_panel_list = ['processes', 'metadata', 'clipboard'] # ================ Style ================= # # Set transparent background or not (this only work when your terminal background is transparent) -transparent_backgroun = false +transparent_background = false # # Border style border_top = "━" diff --git a/src/internal/file_operations_extract.go b/src/internal/file_operations_extract.go index 83d3d4a7..891818fd 100644 --- a/src/internal/file_operations_extract.go +++ b/src/internal/file_operations_extract.go @@ -72,7 +72,7 @@ func unzip(src, dest string) error { } }() totalFiles := len(r.File) - // progessbar + // progressbar prog := progress.New(generateGradientColor()) prog.PercentageStyle = footerStyle // channel message diff --git a/src/internal/function.go b/src/internal/function.go index e54c4ed3..0fb23f48 100644 --- a/src/internal/function.go +++ b/src/internal/function.go @@ -127,8 +127,8 @@ func panelElementHeight(mainPanelHeight int) int { return mainPanelHeight - 3 } -func bottomElementHight(bottomElementHight int) int { - return bottomElementHight - 5 +func bottomElementHeight(bottomElementHeight int) int { + return bottomElementHeight - 5 } func arrayContains(s []string, str string) bool { diff --git a/src/internal/handle_file_operations.go b/src/internal/handle_file_operations.go index 76b16c30..13e1a229 100644 --- a/src/internal/handle_file_operations.go +++ b/src/internal/handle_file_operations.go @@ -274,7 +274,7 @@ func completelyDeleteSingleItem(m model) model { return m } -// Completely delete all file or folder from clipbaord (Not move to the trash can) +// Completely delete all file or folder from clipboard (Not move to the trash can) func completelyDeleteMultipleItems(m model) model { panel := m.fileModel.filePanels[m.filePanelFocusIndex] if len(panel.selected) != 0 { @@ -579,7 +579,7 @@ func extractFile(m model) model { outputDir, err = renameIfDuplicate(outputDir) if err != nil { - outPutLog("Error extract file when craete new directory", err) + outPutLog("Error extract file when create new directory", err) } switch ext { @@ -609,7 +609,7 @@ func compressFile(m model) model { zipName, err := renameIfDuplicate(zipName) if err != nil { - outPutLog("Error compress file when rename dublicate", err) + outPutLog("Error compress file when rename duplicate", err) } zipSource(panel.element[panel.cursor].location, filepath.Join(filepath.Dir(panel.element[panel.cursor].location), zipName)) @@ -633,7 +633,7 @@ func openFileWithEditor(m model) tea.Cmd { }) } -// Open directory with defailt editor +// Open directory with default editor func openDirectoryWithEditor(m model) tea.Cmd { editor := os.Getenv("EDITOR") m.editorMode = true diff --git a/src/internal/handle_panel_movement.go b/src/internal/handle_panel_movement.go index 8b99fd48..a240cba9 100644 --- a/src/internal/handle_panel_movement.go +++ b/src/internal/handle_panel_movement.go @@ -310,7 +310,7 @@ func controlMetadataListUp(m model) model { return m } -// Control metadta panel down +// Control metadata panel down func controlMetadataListDown(m model) model { if m.fileMetaData.renderIndex < len(m.fileMetaData.metaData)-1 { m.fileMetaData.renderIndex++ @@ -323,7 +323,7 @@ func controlMetadataListDown(m model) model { // ======================================== Processbar controller ======================================== // Control processbar panel list up -func contolProcessbarListUp(m model) model { +func controlProcessbarListUp(m model) model { if len(m.processBarModel.processList) == 0 { return m } @@ -345,7 +345,7 @@ func contolProcessbarListUp(m model) model { } // Control processbar panel list down -func contolProcessbarListDown(m model) model { +func controlProcessbarListDown(m model) model { if len(m.processBarModel.processList) == 0 { return m } diff --git a/src/internal/handle_panel_navigation.go b/src/internal/handle_panel_navigation.go index 2f98b7c3..46e72ced 100644 --- a/src/internal/handle_panel_navigation.go +++ b/src/internal/handle_panel_navigation.go @@ -135,7 +135,7 @@ func focusOnProcessBar(m model) model { return m } -// focus on meatadata +// focus on metadata func focusOnMetadata(m model) model { if m.focusPanel == metadataFocus { m.focusPanel = nonePanelFocus diff --git a/src/internal/key_function.go b/src/internal/key_function.go index 747b4347..8f14b71f 100644 --- a/src/internal/key_function.go +++ b/src/internal/key_function.go @@ -9,7 +9,7 @@ func mainKey(msg string, m model, cmd tea.Cmd) (model, tea.Cmd) { if m.focusPanel == sidebarFocus { m = controlSideBarListUp(m) } else if m.focusPanel == processBarFocus { - m = contolProcessbarListUp(m) + m = controlProcessbarListUp(m) } else if m.focusPanel == metadataFocus { m = controlMetadataListUp(m) } else if m.focusPanel == nonePanelFocus { @@ -24,7 +24,7 @@ func mainKey(msg string, m model, cmd tea.Cmd) (model, tea.Cmd) { if m.focusPanel == sidebarFocus { m = controlSideBarListDown(m) } else if m.focusPanel == processBarFocus { - m = contolProcessbarListDown(m) + m = controlProcessbarListDown(m) } else if m.focusPanel == metadataFocus { m = controlMetadataListDown(m) } else if m.focusPanel == nonePanelFocus { diff --git a/src/internal/model_render.go b/src/internal/model_render.go index 517f866a..5beb102a 100644 --- a/src/internal/model_render.go +++ b/src/internal/model_render.go @@ -120,7 +120,7 @@ func filePanelRender(m model) string { } } - // file panel render togther + // file panel render together filePanelRender := "" for _, f := range f { filePanelRender = lipgloss.JoinHorizontal(lipgloss.Top, filePanelRender, f) @@ -208,7 +208,7 @@ func processBarRender(m model) string { courseNumber = m.processBarModel.cursor + 1 } bottomBorder := generateFooterBorder(fmt.Sprintf("%s/%s", strconv.Itoa(courseNumber), strconv.Itoa(len(m.processBarModel.processList))), footerWidth(m.fullWidth)-3) - processRender = procsssBarBoarder(bottomElementHight(footerHeight), footerWidth(m.fullWidth), bottomBorder, m.focusPanel).Render(processRender) + processRender = procsssBarBoarder(bottomElementHeight(footerHeight), footerWidth(m.fullWidth), bottomBorder, m.focusPanel).Render(processRender) return processRender } @@ -251,7 +251,7 @@ func metadataRender(m model) string { sprintfLength = valueLength } - for i := m.fileMetaData.renderIndex; i < bottomElementHight(footerHeight)+m.fileMetaData.renderIndex && i < len(m.fileMetaData.metaData); i++ { + for i := m.fileMetaData.renderIndex; i < bottomElementHeight(footerHeight)+m.fileMetaData.renderIndex && i < len(m.fileMetaData.metaData); i++ { if i != m.fileMetaData.renderIndex { metaDataBar += "\n" } @@ -264,7 +264,7 @@ func metadataRender(m model) string { } bottomBorder := generateFooterBorder(fmt.Sprintf("%s/%s", strconv.Itoa(m.fileMetaData.renderIndex+1), strconv.Itoa(len(m.fileMetaData.metaData))), footerWidth(m.fullWidth)-3) - metaDataBar = metadataBoarder(bottomElementHight(footerHeight), footerWidth(m.fullWidth), bottomBorder, m.focusPanel).Render(metaDataBar) + metaDataBar = metadataBoarder(bottomElementHeight(footerHeight), footerWidth(m.fullWidth), bottomBorder, m.focusPanel).Render(metaDataBar) return metaDataBar } @@ -276,8 +276,8 @@ func clipboardRender(m model) string { if len(m.copyItems.items) == 0 { clipboardRender += "\n ο”° No content in clipboard" } else { - for i := 0; i < len(m.copyItems.items) && i < bottomElementHight(footerHeight); i++ { - if i == bottomElementHight(footerHeight)-1 { + for i := 0; i < len(m.copyItems.items) && i < bottomElementHeight(footerHeight); i++ { + if i == bottomElementHeight(footerHeight)-1 { clipboardRender += strconv.Itoa(len(m.copyItems.items)-i+1) + " item left...." } else { fileInfo, err := os.Stat(m.copyItems.items[i]) @@ -300,7 +300,7 @@ func clipboardRender(m model) string { } else { bottomWidth = footerWidth(m.fullWidth) } - clipboardRender = clipboardBoarder(bottomElementHight(footerHeight), bottomWidth, Config.BorderBottom).Render(clipboardRender) + clipboardRender = clipboardBoarder(bottomElementHeight(footerHeight), bottomWidth, Config.BorderBottom).Render(clipboardRender) return clipboardRender } diff --git a/src/internal/style.go b/src/internal/style.go index 8199cd23..09c2427e 100644 --- a/src/internal/style.go +++ b/src/internal/style.go @@ -116,7 +116,7 @@ func LoadThemeConfig() { helpMenuTitleColor = lipgloss.Color(theme.HelpMenuTitle) if Config.TransparentBackground { - transparentAllBackgrounColor() + transparentAllBackgroundColor() } // All Panel Main Color @@ -174,7 +174,7 @@ func footerWidth(fullWidth int) int { } var transparentBackgroundColor string -func transparentAllBackgrounColor() { +func transparentAllBackgroundColor() { fullScreenBGColor = lipgloss.Color(transparentBackgroundColor) filePanelBGColor = lipgloss.Color(transparentBackgroundColor) sidebarBGColor = lipgloss.Color(transparentBackgroundColor) diff --git a/src/internal/style_function.go b/src/internal/style_function.go index b446fa85..357dce49 100644 --- a/src/internal/style_function.go +++ b/src/internal/style_function.go @@ -179,7 +179,7 @@ func stringColorRender(fgColor lipgloss.Color, bgColor lipgloss.Color) lipgloss. Background(bgColor) } -// Geerate border style +// Generate border style func generateBorder() lipgloss.Border { return lipgloss.Border{ Top: Config.BorderTop, diff --git a/src/superfile/hotkeys.toml b/src/superfile/hotkeys.toml index 05ae376f..86e3edce 100644 --- a/src/superfile/hotkeys.toml +++ b/src/superfile/hotkeys.toml @@ -1,11 +1,11 @@ # ================================================================================================= -# Here is global, all global key cant conflicts with other hotkeys +# Here is global, all global key can't conflicts with other hotkeys confirm = ['enter', 'l'] quit = ['q', 'esc'] # (q)uit # movement list_up = ['up', 'k'] # most user use list_down = ['down', 'j'] # most user use -# file panel controll +# file panel control close_file_panel = ['w', ''] create_new_file_panel = ['n', ''] # (n)ew file panel next_file_panel = ['tab', 'L'] @@ -38,11 +38,11 @@ open_help_menu = ['?', ''] confirm_typing = ['enter', ''] cancel_typing = ['ctrl+c', 'esc'] # ================================================================================================= -# Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is normal mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) parent_directory = ['h', 'backspace'] search_bar = ['/', ''] # ================================================================================================= -# Here is select mode hotkey you can conflicts with other mode (cant conflicts with global hotkey) +# Here is select mode hotkey you can conflicts with other mode (can't conflicts with global hotkey) file_panel_select_mode_items_select_down = ['shift+down', 'J'] file_panel_select_mode_items_select_up = ['shift+up', 'K'] file_panel_select_all_items = ['A', '']