Skip to content

Commit

Permalink
Merge branch 'main' of github.com:MHNightCat/superfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yorukot committed May 12, 2024
2 parents 3bce80b + b76c44e commit a5fcd02
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 63 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -21,22 +21,22 @@ 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 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?

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.

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bash -c "$(wget -qO- https://raw.githubusercontent.com/MHNightCat/superfile/main
<details><summary>Click to expand</summary>
<p>

#### Install with nix command line:
#### Install with nix command-line:

```bash
nix profile install github:MHNightCat/superfile#superfile
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:

Expand All @@ -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
Expand Down Expand Up @@ -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`

Expand All @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ 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)
- 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)

> 2024/05/08
> 2024-05-08
#### Update
- Update help menu [`#75`](https://github.com/MHNightCat/superfile/issues/75)
Expand All @@ -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
Expand All @@ -35,24 +35,24 @@ 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

- 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)
Expand All @@ -65,18 +65,18 @@ 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)

> 2024/04/08
> 2024-04-08
#### Update

- 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)
Expand All @@ -88,13 +88,13 @@ 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

- 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

Expand All @@ -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
8 changes: 4 additions & 4 deletions src/internal/config_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
}
10 changes: 5 additions & 5 deletions src/internal/default_config.go
Original file line number Diff line number Diff line change
@@ -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']
Expand Down Expand Up @@ -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', '']
Expand All @@ -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 = "━"
Expand Down
2 changes: 1 addition & 1 deletion src/internal/file_operations_extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/internal/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/internal/handle_file_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/internal/handle_panel_movement.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion src/internal/handle_panel_navigation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit a5fcd02

Please sign in to comment.