Skip to content

Commit

Permalink
update readme themelist hotkey and add theme with a author
Browse files Browse the repository at this point in the history
  • Loading branch information
yorukot committed Apr 6, 2024
1 parent 63b6f43 commit 9ee1d86
Show file tree
Hide file tree
Showing 10 changed files with 243 additions and 22 deletions.
52 changes: 52 additions & 0 deletions HOTKEY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## General

| Function | Key | Variable name |
| --------------- | ---------- | ------------- |
| Start SuperFile | `spf` | |
| Reload | `ctrl+R` | `reload` |
| Quit | `esc`, `q` | `quit` |

## Panel navigation

| Function | Key | Variable name |
| ---------------------------------------------------------- | ----------------- | -------------------- |
| Pinned or Unpinned folder to sidebar and can be auto saved | `ctrl+p` | `pinnedFolder` |
| Create new file panel | `ctrl+n` | `createNewFilePanel` |
| Close the focused file panel | `ctrl+w` | `closeFilePanel` |
| Focus on the file panel | `tab` | `nextFilePanel` |
| Focus on the previous file panel | `shift+left`, `q` | `previousFilePanel` |
| Focus on the processbar panel | `p` | `focusOnProcessBar` |
| Focus on the sidebar | `b` | `focusOnSideBar` |
| Focus on the metadata panel | `m` | `focusOnMetaData` |

## Panel movement

| Function | Key | Variable name |
| --------------------------------------------------- | -------------------------- | ------------------------------------------------------------------ |
| Change to selection mode or normal mode | `v` | `changePanelMode` |
| Up | `up`, `k` | `listUp` |
| Down | `down`, `j` | `listDown` |
| Go to folder | `enter`, `l` | `selectItem` |
| Return to parent folder | `h`, `backspace` | `parentFolder` |
| Select all item in focused file panel | `ctrl+a` | `filePanelSelectAllItem`(only work on selection mode) |
| Select with your course | `shift+up`, `K`(shift+k) | `filePanelSelectModeItemSelectUp`(only work on selection mode) |
| Select with your course | `shift+left`, `j`(shift+j) | `filePanelSelectModeItemSelectDown`(only work on selection mode) |
| Select the item where the current cursor is located | `enter`, `l` | `filePanelSelectModeItemSingleSelect`(only work on selection mode) |

## File operations

| Function | Key | Variable name |
| -------------------------------- | -------- | ----------------------------------------------------------------------------- |
| Create a new folder | `f` | `filePanelFolderCreate` |
| Create a new file | `c` | `filePanelFileCreate` |
| Rename file or folder | `r` | `filePanelItemRename` |
| Delete file or folder or both | `ctrl+d` | `deleteItem`(normal mode) <br> `filePanelSelectModeItemDelete`(select mode) |
| Copy file or folder or both | `ctrl+c` | `copySingleItem`(normal mode) <br> `filePanelSelectModeItemCopy`(select mode) |
| Paste all item in your clipboard | `ctrl+v` | `pasteItem` |

## Special

| Function | Key | Variable name |
| ----------------------------- | --------------- | ------------- |
| Confirm rename or create item | `enter` | `confirm` |
| Cancel rename or create item | `ctrl+c`, `esc` | `cancel` |
166 changes: 165 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,170 @@
<div align="center">

# SUPERFILE

![](/asset/demo.png)

</div>

## Demo

| Perform common operations |
| ------------------------- |
| ![](/asset/demo.gif) |

## Content

- [Features](#features)
- [Download](#download)
- [Support system](#support-system)
- [Themes](#themes)
- [Use an existing theme](#use-an-existing-theme)
- [Completely customize your theme](#completely-customize-your-theme)
- [Download](#download)
- [Hotkey](#hotkey)
- [Contribute](#contribute)
- [Share your idea](#share-your-idea)
- [Bug report](#bug-report)
- [Share your themes](#share-your-themes)
- [Todo list](#todo-list)
- [Star History](#star-history)
## Features

- Fancy gui
- Fully customizable
- Vim's selection mode
- Easy to use
- Trash can

## Download

> I am still try to make more install method! Like `HomeBrew` or `snap`
You can go to [latest release](https://github.com/MHNightCat/superfile/releases/latest) and download binary file

cd to download and move binary to bin
```bash
cd ~/Download
sudo mv ./spf /bin/
```

## Support system

- [X] Linux
- [X] Macos - Not tested, but should work
- [ ] Windows - Not support

## Themes

### Use an existing theme
You can go to [theme list](https://github.com/MHNightCat/superfile/blob/main/THEMELIST.md) to find which is you liked!

> We only have a few themes at the moment, we will be making more over the next time! [Or you can public your own theme](https://github.com/MHNightCat/superfile/pulls)!
and editor `~/.superfile/config/config.json`

Edit config.json using `Nano`:

```
nano ~/.superfile/config/config.json
```

Edit config.json using `Vim`:

```
vim ~/.superfile/config/config.json
```

change

```json
"theme": "gruvbox",
```
to

```json
"theme": "you like theme name",
```

### Completely customize your theme

If you want to customize your own theme, you can go to `~/.superfile/theme/YOUR_THEME_NAME.json`
and copy the existing themes json to your own theme file

Now you can customize your own theme!!

And if you complete your theme you can change

```json
"theme": "gruvbox",
```
to

```json
"theme": "YOUR_THEME_NAME",
```

[If you are satisfied with your theme, you might as well put it into the default theme list!](#contribute)

## Hotkey

[**Click me to watch the hotkey list**](https://github.com/MHNightCat/superfile/blob/main/HOTKEY.md)

**You can change the all hotkey in** `~/.superfile/config/config.json`

Edit config.json using `Nano`:

```
nano ~/.superfile/config/config.json
```

Edit config.json using `Vim`:

```
vim ~/.superfile/config/config.json
```

> normal mode mean browser mode
All global hotkeys cannot conflict with other hotkeys(Except special hotkey).

The hotkey ranges I wrote in config.json

## Contribute

[**Click me to learn how to contribute**](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project)

### Share your idea
[**I have some idea but i don't know how to contribute**](https://github.com/MHNightCat/superfile/discussions)

> We welcome anyone with any ideas about superfile!!
### Bug report

[**Bug report in here~**](https://github.com/MHNightCat/superfile/issues)

### Share your themes

Same as contribution. Just put your own theme into `/themes`
and create a pull request!

If you really want to share your theme but you don't know how to do it
You can go to [here](https://github.com/MHNightCat/superfile/discussions/new?category=theme) create a discussion and i will help you(if i have time)


## Todo list

**I hope i can complete all this todo list haha**

- [x] Auto init config file
- [ ] Compress and decompress files
- [ ] Can cancel the progress of the process bar
- [ ] Undo function
- [ ] Auto clear trash can
- [ ] AES encryption and decryption

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=MHNightCat/superfile&type=Date)](https://star-history.com/#MHNightCat/superfile&Date)
**THANKS FOR All OF YOUR STAR!**

[![Star History Chart](https://api.star-history.com/svg?repos=MHNightCat/superfile&type=Date)](https://star-history.com/#MHNightCat/superfile&Date)
3 changes: 3 additions & 0 deletions THEMELIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## gruvbox

![](/asset/theme/gruvbox.png)
Binary file added asset/theme/gruvbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 12 additions & 14 deletions src/.superfile/config/config.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
{
{
"theme": "gruvbox",

"_COMMIT_HOTKEY": "",

"_COMMIT_global_hotkey": "Here is global, all global key cant conflicts with other hotkeys",
"reload": ["ctrl+r", ""],

"quit": ["esc", "q"],

"listUp": ["up", "k"],
"listDown": ["down", "j"],

"nextFilePanel": ["tab", ""],
"previousFilePanel": ["shift+left", ""],
"pinnedFolder": ["ctrl+p", ""],

"closeFilePanel": ["ctrl+w", ""],
"createNewFilePanel": ["ctrl+n", ""],

"changePanelMode": ["v", ""],

"nextFilePanel": ["tab", ""],
"previousFilePanel": ["shift+left", ""],
"focusOnProcessBar": ["p", ""],
"focusOnSideBar": ["b", ""],
"focusOnMetaData": ["m", ""],

"pasteItem": ["ctrl+v", ""],
"changePanelMode": ["v", ""],

"filePanelFolderCreate": ["f", ""],
"filePanelFileCreate": ["c", ""],
"filePanelItemRename": ["r", ""],

"pinnedFolder": ["ctrl+p", ""],
"pasteItem": ["ctrl+v", ""],

"_COMMIT_popup_modal_hotkey": "These hotkeys do not conflict with any other keys (including global hotkey)",
"_COMMIT_special_hotkey": "These hotkeys do not conflict with any other keys (including global hotkey)",
"cancel": ["ctrl+c", "esc"],
"confirm": ["enter"],
"confirm": ["enter", ""],

"_COMMIT_normal_mode_hotkey": "Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)",
"deleteItem": ["ctrl+d", ""],
Expand All @@ -46,9 +45,8 @@
"filePanelSelectModeItemSelectUp": ["shift+up", "K"],
"filePanelSelectModeItemDelete": ["ctrl+d", "delete"],
"filePanelSelectModeItemCopy": ["ctrl+c", ""],
"filePanelSelectModeItemPast": ["ctrl+v", ""],
"filePanelSelectModeItemCut": ["ctrl+x", ""],
"filePanelSelectAllItem": ["ctrl+a", ""],

"_COMMIT_process_bar_hotkey": "Here is process bar panel hotkey you can conflicts with other mode (cant conflicts global hotkey)"
}
4 changes: 3 additions & 1 deletion src/.superfile/theme/gruvbox.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
{
"_AUTHOR": "github.com/MHNightCat",

"border": "#868686",
"cursor": "#8EC07C",

Expand Down
10 changes: 5 additions & 5 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func Unzip(src, dest string) error {
return nil
}

const configJsonString string = `{
const configJsonString string = `{
"theme": "gruvbox",
"_COMMIT_HOTKEY": "",
Expand All @@ -303,16 +303,16 @@ const configJsonString string = `{
"focusOnMetaData": ["m", ""],
"pasteItem": ["ctrl+v", ""],
"filePanelFolderCreate": ["f", ""],
"filePanelFileCreate": ["c", ""],
"filePanelItemRename": ["r", ""],
"pinnedFolder": ["ctrl+p", ""],
"_COMMIT_popup_modal_hotkey": "These hotkeys do not conflict with any other keys (including global hotkey)",
"cancel": ["ctrl+c", "esc"],
"confirm": ["enter"],
"confirm": ["enter"],
"_COMMIT_normal_mode_hotkey": "Here is normal mode hotkey you can conflicts with other mode (cant conflicts with global hotkey)",
"deleteItem": ["ctrl+d", ""],
Expand All @@ -330,6 +330,6 @@ const configJsonString string = `{
"filePanelSelectModeItemPast": ["ctrl+v", ""],
"filePanelSelectModeItemCut": ["ctrl+x", ""],
"filePanelSelectAllItem": ["ctrl+a", ""],
"_COMMIT_process_bar_hotkey": "Here is process bar panel hotkey you can conflicts with other mode (cant conflicts global hotkey)"
}`
Binary file modified theme.zip
Binary file not shown.
Empty file removed theme/README.md
Empty file.
4 changes: 3 additions & 1 deletion theme/gruvbox.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
{
"_AUTHOR": "github.com/MHNightCat",

"border": "#868686",
"cursor": "#8EC07C",

Expand Down

0 comments on commit 9ee1d86

Please sign in to comment.