Skip to content

Commit d2c52aa

Browse files
committed
✨ Trashcan and Preferences
Modal File Manager will now delete to the trashcan on macOS with the trash-cli. The command line program needs to be installed first. Started working on the preferences settings with whether to use the trashcan or not. Framework is in place for the theme manager as well.
1 parent 77f2172 commit d2c52aa

24 files changed

+740
-133
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,26 @@ I've created multiple open source resources (I have around 80 GitHub repositorie
4949
## Current Feature Set
5050

5151
- Dual pane file manager with vim style model hotkeys for navigation and action launching.
52-
- Command bar for executing commands (`:` in any mode or `<ctrl>p` in normal mode).
52+
- Command Prompt for executing commands (`:` in any mode or `<ctrl>p` in normal mode).
5353
- Fully extendable with extensions using the extensions API
5454
- Fully extendable to alternate file systems
55-
- Fully theme-able
55+
- Fully theme-able. Theme manager in the development.
5656
- A file details side panel can be shown to overlay the panel not currently focused (`toggleExtraPanel` command). It shows video previews and stats with the ffmpeg programs installed.
5757
- Themes and extensions are explorable and downloadable from GitHub inside the program.
5858
- Hot keys are programmable
5959
- A number before a hot key runs it's associated command that many times (ex: `5j` will move the cursor 5 entries down the list).
6060
- Watches for changes in the current directory and updates accordingly.
6161
- Changing directories in the Directory Bar (normal mode `q`) shows a list of matching entries from history and then below the current directory.
62-
- File editor is configurable by the `~/.myeditorchoice` file (see `Editing Files` below)
62+
- File editor is configurable by the `~/.myeditorchoice` file (see `Editing Files` below). Otherwise, the system editor for the file type will be used.
6363
- Integrated with ScriptPad - another project of mine coming soon!
6464
- Quick Search - a input to type text so that any entry at that level is removed that doesn't have that text in it. Just refresh the pane to get back to normal. I think of it as a quick filter more than a quic search.
6565
- Toggle System files/folders visibility
66+
- Optionally deletes to the OS's trashcan (external program has to be installed)
67+
- Change the environment used to execute external programs using the `Show Preferences` Command Prompt command.
6668

6769
## Installation
6870

69-
These directions currently work for the macOS. I haven't tested for finished the Linux or Windows installation.
71+
These directions currently work for the macOS. I haven't tested for finished the Linux or Windows installation. All external programs should be installed before first running the Modal File Manager. Otherwise, you will have to modify the path used to execute external programs to find them.
7072

7173
I have a run script made with [Mask](https://github.com/jakedeichert/mask) and [Node.js](https://nodejs.org/en/). You have to put a copy of [NW.js](https://nwjs.io/) in the 'misc' directory as `nwjs.app`. Or, you can change the script. I'm assuming you aren't changing the script in the following.
7274

@@ -101,7 +103,7 @@ mask launch -d
101103

102104
which will launch the sdk version of NW.js with full development tools.
103105

104-
I'm working on making actual releases, but I'm having issues with getting it right on the macOS. You should be able to run it on Windows and Linux, but I haven't tested it on those platforms. Actually, since I'm using mostly command line commands to perform actions, running on Windows will most likely not work currently. But, I to plan on fleshing it out soon. I currently only have a Mac and do all my work on it. Donations will help me expand out to the other platforms, or if anyone wants to lend a hand!
106+
If you just want to download a program to use, check the releases. I'm currently releasing alpha level macOS binaries in the releases.
105107

106108
## Upgrading
107109

@@ -113,9 +115,11 @@ There are a few non-standard command line programs I use with Modal File Manager
113115

114116
- [ffmpeg](https://ffmpeg.org/) for getting and using video information in the Extra Panel.
115117
- [fd](https://github.com/sharkdp/fd) for quick file finding. It's a `find` replacement written in Rust.
116-
- I also use the standard cp, mv, and rm commands on the command line. These still run faster than rewriting them in the scripting language. The major drawback is there isn't a backup method. Once deleted, always deleted. `Trashcan` support will come later.
118+
- For using the macOS trashcan, you have to have (`trash`)[https://github.com/andreafrancia/trash-cli] command line program installed using `brew install trash-cli`. If the program isn't installed before installing mfm, then you will need to adjust the environment variable for PATH in the preferences to make sure it is in the path.
117119

118-
All of the programs should be downloaded and in your shells path. Modal File Manager doesn't assume location for anything except or it's own configuration files.
120+
I also use the standard `cp`, `mv`, and `rm` commands on the command line. These still run faster than rewriting them in the scripting language. The major drawback is there isn't a backup method. Once deleted, always deleted.
121+
122+
All of the programs should be downloaded and in your shell's path. Modal File Manager doesn't assume location for anything except or it's own configuration files. But, if Modal File Manager can't find the program, you can adjust the path used in the preferences (Command Prompt command is `Show Preferences`).
119123

120124
## Configuration Files
121125

@@ -174,8 +178,6 @@ file in the default file editor.
174178
- Reloading extensions without relaunching
175179
- Add more file views for the Extra Panel
176180
- Multiple windows
177-
- Create an icon for the program
178-
- Create a proper macOS application
179181
- Get Windows working
180182
- Get Linux tested and working
181183
- Get audio listening in the Extras Panel.
@@ -275,8 +277,9 @@ These commands can be ran from the command prompt. They all act upon the current
275277
| `Rerun Last Command` | This will rerun the last command along with it the number of times it was ran. | reRunLastCommand |
276278
|`Toggle Filter` | Toggles the show all and default filters. | toggleFilter |
277279
| `Show All Filter` | Sets to show all Entries. | setShowAllFilter |
278-
| `Show Only Non-System Files/Folders | Sets the default filter of not showing system files/folders. | setDefaultFilter |
280+
| `Show Only Non-System Files/Folders` | Sets the default filter of not showing system files/folders. | setDefaultFilter |
279281
| `Open in Opposite Panel` | Opens the directory the cursor is on or the directory the cursor is in in the opposite panel. | openOppositePanel |
282+
| `Reload Extensions` | Reload all the extensions, keyboard maps, and theme. | reloadExtensions |
280283

281284
### Extension Commands
282285

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "16x16",
5+
"idiom" : "mac",
6+
"filename" : "mfm-icon-16.png",
7+
"scale" : "1x"
8+
},
9+
{
10+
"size" : "16x16",
11+
"idiom" : "mac",
12+
"filename" : "mfm-icon-32.png",
13+
"scale" : "2x"
14+
},
15+
{
16+
"size" : "32x32",
17+
"idiom" : "mac",
18+
"filename" : "mfm-icon-32.png",
19+
"scale" : "1x"
20+
},
21+
{
22+
"size" : "32x32",
23+
"idiom" : "mac",
24+
"filename" : "mfm-icon-64.png",
25+
"scale" : "2x"
26+
},
27+
{
28+
"size" : "128x128",
29+
"idiom" : "mac",
30+
"filename" : "mfm-icon-128.png",
31+
"scale" : "1x"
32+
},
33+
{
34+
"size" : "128x128",
35+
"idiom" : "mac",
36+
"filename" : "mfm-icon-256.png",
37+
"scale" : "2x"
38+
},
39+
{
40+
"size" : "256x256",
41+
"idiom" : "mac",
42+
"filename" : "mfm-icon-256.png",
43+
"scale" : "1x"
44+
},
45+
{
46+
"size" : "256x256",
47+
"idiom" : "mac",
48+
"filename" : "mfm-icon-512.png",
49+
"scale" : "2x"
50+
},
51+
{
52+
"size" : "512x512",
53+
"idiom" : "mac",
54+
"filename" : "mfm-icon-512.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "512x512",
59+
"idiom" : "mac",
60+
"filename" : "mfm-icon-1024.png",
61+
"scale" : "2x"
62+
}
63+
],
64+
"info" : {
65+
"version" : 1,
66+
"author" : "xcode"
67+
}
68+
}
99.5 KB
Loading
11.5 KB
Loading
1.86 KB
Loading
25.1 KB
Loading
2.99 KB
Loading
57.1 KB
Loading
5.45 KB
Loading

public/bundle.bin

36.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)