diff --git a/.notes/build.md b/.notes/build.md index e49935e..15aa505 100644 --- a/.notes/build.md +++ b/.notes/build.md @@ -2,6 +2,8 @@ To build the project, run: wails build --platform="darwin/universal" -or +to build a universal binary for macOS. Or mask build + +to build a binary for the current system only. diff --git a/README.md b/README.md index 782705f..711eebc 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,11 @@ I started my programming career with Emacs as my main text editor on a main fram With Spacemacs and Doom-emacs, I learned that the Vim style keyboard was much more efficient. But, I kept going back to the Emacs key memory. I finally decided to really give Vim a run with neovim on my MacBook Air. I even installed Spacevim and really liked it. Now, I'm fully comfortable in the Vim style keyboard (but far from mastering it completely) and have adapted it to many other programs along the way. My current editor of choice is [OniVim2](https://github.com/onivim/oni2) which is the fastest programming editor I've ever used. It is great! -But, I've never been happy with the file managers I've used. [fman](https://fman.io/) is great, but not actively being maintained and expanded upon. I also don't really like python, it's API language. So, I decided to jump in and make one to suit me better. This is how Modal File Manager was started. I wanted something that was as configurable as TkDesk was, but with a modal keyboard model for hotkeys. To take it even further, new modes and keymaps can be added with extensions. +But, I've never been happy with the file managers I've used. [fman](https://fman.io/) is great, but not actively being maintained and expanded upon. It is very slow in large directories and I also don't really like python: it's API language. So, I decided to jump in and make one to suit me better. This is how Modal File Manager was started. I wanted something that was as configurable as TkDesk was (if anyone remembers it), but with a modal keyboard model for hotkeys. To take it even further, new modes and keymaps can be added with extensions. -Modal File Manager is also somewhat minimal in the UI. Many graphical file managers have buttons, shelves, etc. all over the place with information everywhere. I decided to make the main interface as low keyed as possible with all other information in the status line or extras panel. Extra file information is on the status line for the current cursor location. More information is displayed in extras panel as well. +Modal File Manager is also somewhat minimal in the UI. Many graphical file managers have buttons, shelves, etc. all over the place with information everywhere. I decided to make the main interface as low keyed as possible with all other information in the status line or extras panel. Extra file information is on the status line for the current cursor location. More information is displayed in the extras panel as well (the side opposite the current pointer shows extra information instead of the other file pane. When turned off, it automatically goes back to the file pane that was showing before switching.). -Since there are so many dual pane file managers available, I knew this would never be a marketable product (and I did not want the hassle of endless customer complaint over a feature not working the way they want it). Therefore, I'm making this an open source project to hopefully get some help from other to really making this thing shine. +Since there are so many dual pane file managers available, I knew this would never be a marketable product (and I did not want the hassle of endless customer complaint over a feature not working the way they want it). Therefore, I'm making this an open source project to hopefully get some help from others to help really make this thing shine. Therefore, I hope you enjoy this little program as much as I have. Feel free to sponsor the project, help code some of it (just send in the pull requests), or just give me some tips along the way. Any help is appreciated. @@ -75,7 +75,7 @@ I've created multiple open source resources (I have around 80 GitHub repositorie - Watches for changes in the current directory and updates accordingly. - Changing directories in the Directory Bar (normal mode `q`) shows a list of matching entries from history and then below the current directory. - File editor is configurable by the `~/.myeditorchoice` file (see `Editing Files` below). Otherwise, the system editor for the file type will be used. -- Integrated with ScriptPad - another project of mine coming soon! +- Integrated with [EmailIt](https://github.com/raguay/EmailIt). - 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 quick search. - Toggle System files/folders visibility - Optionally deletes to the OS's trashcan (external program has to be installed) @@ -105,6 +105,7 @@ All Dracula based themes are here with permission from the author. Please suppor Because this is a web technologies application, there are certain things that it just can't do and I'm not sure if they can be done at this level. Therefore, this will not completely remove your dependency on using the Finder application. But, these instances are not everyday items for which we use a file manager. As I see it, these items are not doable, but I would love for someone to prove me wrong: - Install applications that the macOS Gatekeeper will allow. +- Drad and drop with other programs. ## Installation @@ -468,7 +469,7 @@ This list of tutorials are with the latest version of Modal File Manager: I finally made my first attempt at an icon for Modal File Manager. The files are in the `frontend/icons` directory. Any constructive criticizm is welcome. -![Icon](https://github.com/raguay/ModalFileManager/blob/main/appicon.png) +![Icon](https://github.com/raguay/ModalFileManager/blob/main/build/appicon.png) ## Sponsor this project diff --git a/appicon.png b/appicon.png deleted file mode 100644 index d8ba4c6..0000000 Binary files a/appicon.png and /dev/null differ diff --git a/frontend/src/components/CommandPrompt.svelte b/frontend/src/components/CommandPrompt.svelte index 9ad6e2d..fa0f72e 100644 --- a/frontend/src/components/CommandPrompt.svelte +++ b/frontend/src/components/CommandPrompt.svelte @@ -19,7 +19,7 @@ onMount(() => { width = window.innerWidth - 30; - keyProcess.set(false); + $keyProcess = false; if (commands != null) filtered = commands.commandList; }); diff --git a/frontend/src/components/DirectoryListing.svelte b/frontend/src/components/DirectoryListing.svelte index fa56cbc..3086a61 100644 --- a/frontend/src/components/DirectoryListing.svelte +++ b/frontend/src/components/DirectoryListing.svelte @@ -17,12 +17,10 @@ let newPath; let inputPath; let dirlist = []; - let localTheme = {}; let dirListDOM; let tryagain = false; let pending = false; let dirIndex = 0; - let localDirListeners = []; let lastDir = ""; let rightSet = false; let leftSet = false; @@ -31,15 +29,6 @@ $: setEditFlag(edit); onMount(() => { - const unsubscribeTheme = theme.subscribe((value) => { - localTheme = value; - }); - const unsubscribeDirectoryListeners = directoryListeners.subscribe( - (value) => { - localDirListeners = value; - } - ); - localTheme = get(theme); newPath = shortenPath(path); if (side === "left") { window.runtime.EventsOn("leftDirChange", () => { @@ -56,10 +45,7 @@ }); }); } - return () => { - unsubscribeTheme(); - unsubscribeDirectoryListeners(); - }; + return () => {}; }); afterUpdate(async () => { @@ -94,7 +80,7 @@ if (typeof pth !== "undefined") { if (lastDir !== pth) { lastDir = pth; - localDirListeners.map((value) => { + $directoryListeners.map((value) => { value(pth, ""); }); } @@ -107,7 +93,7 @@ } } - function setEdit(e) { + function setEdit() { show = false; inputPath = path.path; dirIndex = 0; @@ -118,14 +104,14 @@ if (inputPath[inputPath.length - 1] !== sep) { inputPath = inputPath + sep; } - keyProcess.set(false); + $keyProcess = false; } async function editOff() { if (await path.fileSystem.dirExists(inputPath)) { show = true; dirlist = []; - keyProcess.set(true); + $keyProcess = true; dispatch("dirChange", { path: inputPath, cursor: true, @@ -137,7 +123,7 @@ inputPath = dirlist[dirIndex]; show = true; dirlist = []; - keyProcess.set(true); + $keyProcess = true; if (await path.fileSystem.dirExists(inputPath)) { dispatch("dirChange", { path: inputPath, @@ -169,9 +155,7 @@ // // Add to the history. // - var hist = get(dirHistory); - hist.addHistory(result); - dirHistory.set(hist); + $dirHistory.addHistory(result); // // Fixing the path. @@ -252,8 +236,7 @@ // // Get matches from history. // - var hist = get(dirHistory); - dirlist = hist.searchHistory(inputPath); + dirlist = $dirHistory.searchHistory(inputPath); if (dirlist === null) dirlist = []; numleft -= dirlist.length; if (numleft > 0) { @@ -317,7 +300,7 @@ {#if dirlist.length > 0 && dirListDOM !== null && dirInputDOM !== null}