Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Settings rewrites `config.json` when it saves, so `//` comments in it are not ke
]}
],
"recentCount": 15,
"showAppRecent": false, // a second submenu: the folders used most in this app
"historyExclude": ["C:\\Windows\\*", "*\\node_modules\\*"],
"actions": [
{ "name": "Open &terminal here", "command": "wt.exe", "args": "-d \"{path}\"" },
Expand All @@ -103,7 +104,7 @@ Settings rewrites `config.json` when it saves, so `//` comments in it are not ke

`&` marks the accelerator key in names. History lives in `history.json`, and errors are logged to `folderite.log`, both in the same folder.

Recent folders are ranked by how often and how recently you used them, with a boost for folders used in the app the menu is opened over.
Recent folders are ranked by how often and how recently you used them, and the list is the same in every app. With `showAppRecent` on, a second submenu lists the folders used most in the app the menu is opened over.

## How it works

Expand Down
3 changes: 2 additions & 1 deletion docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ There are no tests for Explorer, the file dialogs or the third-party apps. Those
- Elevated Explorer/dialog: fails gracefully unless Folderite runs elevated
- Keyboard shortcut: opens the menu for Explorer (active tab), a file dialog, Directory Opus (focused side) and the desktop; elsewhere picking a folder opens a new Explorer window; does nothing while paused; a shortcut that's taken shows a warning in Settings
- Favorite with subfolders: submenu lists subfolders (by name / newest first); the folder itself is the bold top item; a disconnected network folder doesn't freeze the menu
- Recent folders: folders used in the current app rank higher there
- Recent folders: the same list over Explorer, Directory Opus and a file dialog; a folder inside a zip file (Explorer) or a 7z file (Opus) is not recorded
- Recent in this app (when enabled): over Opus it is named **Recent in Directory Opus** and lists only folders used in Opus; over Notepad's Save dialog it is named after Notepad; not shown over the tray icon
- Dialog start folder: off by default; when on, a new Open/Save dialog moves to the app's last folder and keeps the typed file name; a per-app folder wins; folder pickers work
- Drives submenu (when enabled): lists drives with free space; a disconnected network drive doesn't hang the menu

Expand Down
4 changes: 3 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ If you keep notes in comments, keep them in a copy of the file, or edit by hand
| --- | --- | --- | --- |
| `favorites` | list of [favorite entries](#favorites) | `[]` (see below) | The favorites section of the menu. |
| `recentCount` | number | `15` | How many folders the **Recent** submenu lists. `0` hides the submenu. A negative number counts as `0`. Settings limits it to 0 to 50 (**Menu > Recent folders**). |
| `showAppRecent` | true or false | `false` | Add a **Recent in** submenu with the folders used most in the app the menu is opened over. It lists up to `recentCount` folders. |
| `historyExclude` | list of text | `[]` | [Wildcard patterns](#history-exclusions) for folders that are never remembered. |
| `actions` | list of [actions](#actions) | one action, **Open &terminal here** | Commands in the current folder's submenu. |
| `disabledProcesses` | list of text | `[]` | Program names, without `.exe`, where Folderite does nothing. |
Expand All @@ -46,7 +47,7 @@ Some defaults need a note:
- **`favorites`.** A key that is missing means no favorites. On first run, Folderite creates the file with four: `&Home` (your user folder), `&Desktop`, `Do&wnloads` and `D&ocuments`, each written as a full path.
- **`actions`.** A key that is missing gives the one default action, `Open &terminal here`, which runs `wt.exe` with `-d "{path}"`. To have no actions at all, write `"actions": []`.

Where each key appears in Settings: `favorites` on **Favorites**, `actions` on **Actions**, `recentCount`, `showOpenWindows`, `showClipboard`, `showDrives` and `enableOnDesktop` on **Menu**, `dialogLastFolder` and `dialogFolders` on **Dialogs**, `historyExclude` and `disabledProcesses` on **Exclusions**, and `hotkey` on **General**. See [Settings](settings.md).
Where each key appears in Settings: `favorites` on **Favorites**, `actions` on **Actions**, `recentCount`, `showAppRecent`, `showOpenWindows`, `showClipboard`, `showDrives` and `enableOnDesktop` on **Menu**, `dialogLastFolder` and `dialogFolders` on **Dialogs**, `historyExclude` and `disabledProcesses` on **Exclusions**, and `hotkey` on **General**. See [Settings](settings.md).

## Favorites

Expand Down Expand Up @@ -207,6 +208,7 @@ Every key appears once.
]}
],
"recentCount": 15,
"showAppRecent": false, // a second submenu: the folders used most in this app
"historyExclude": ["C:\\Windows\\*", "*\\node_modules\\*"],
"actions": [
{ "name": "Open &terminal here", "command": "wt.exe", "args": "-d \"{path}\"" },
Expand Down
2 changes: 1 addition & 1 deletion docs/dialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Folderite reads the folder from the address bar of the dialog (the breadcrumb).
- The menu header shows the folder the dialog is in, with **Copy path**, your [actions](settings.md#actions) and **Add to favorites**.
- If the dialog is somewhere that is not a folder path, such as **This PC** or a library, there is no current folder. The menu still opens and navigation still works, but the current-folder submenu is missing, and so are the actions.

The folder you were in is also recorded in [history](settings.md#history) under the program's name, which is how **Recent** favors the folders you use in that program.
The folder you were in is also recorded in [history](settings.md#history) under the program's name. That is where [Recent folders for this app](menu.md#recent-folders-for-this-app) gets the folders you use in that program.

## Navigating and keeping your file name

Expand Down
11 changes: 3 additions & 8 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ For a click on a supported window:

1. The hook thread sees the middle-button press, finds the adapter, swallows the click and posts a trigger message.
2. The main thread resolves the window again with the click point and gets the adapter. (`App.OnTrigger`.)
3. `App.ShowFolderMenu` asks the adapter for the current folder, and records it in history. It collects the open windows from every adapter, the top recent folders, and the folder on the clipboard.
3. `App.ShowFolderMenu` asks the adapter for the current folder, and records it in history. It collects the open windows from every adapter, the top recent folders, and the folder on the clipboard. With `showAppRecent` on, it also gets the top folders for the app's process and a name for the submenu: the adapter's name, such as Directory Opus, or for a file dialog the program's file description.
4. `MenuComposer.Build` makes a menu tree from the config and this context.
5. `MenuBuilder.Show` shows it and waits for you to pick.
6. The chosen item's action runs after the menu is gone. For a folder, `App.Navigate` brings the target window to the front, calls the adapter's `Navigate`, and records the folder in history for that app. If `Navigate` fails, a tray balloon says so.
Expand Down Expand Up @@ -162,13 +162,7 @@ A folder's score is its rank times a factor that depends on how long ago you las
| Less than 7 days ago | 0.5 |
| Longer ago | 0.25 |

So that the **Recent** list can favor the app you're in, the sort key is:

```text
score(folder) + 3 * score(folder's use in this app)
```

where each `score` is rank times the factor for that last-used time. The factor `3` is `AppWeight`. A few uses in the current app outweigh a modest lead elsewhere, but a far more popular folder still wins. Ties go to the most recent visit. With no app (the tray icon), the second term is zero.
`Top` sorts by that score, with ties going to the most recent visit. It ignores the per-app numbers, so **Recent** is the same list everywhere. `TopInApp`, used for the **Recent in** submenu when `showAppRecent` is on, sorts only the folders used in one app, by the score of their use in that app, with ties going to the most recent visit in that app. The per-app numbers also give `LastInApp`, the start folder for **Start in the last folder used** (see [Open and Save dialogs](dialogs.md)).

The rest of the rules:

Expand All @@ -177,6 +171,7 @@ The rest of the rules:
- At most 1000 folders are kept. If there are more, the lowest scores go first.
- At most 10 apps are kept for each folder.
- Folders that match a pattern in `historyExclude` are neither recorded nor returned.
- A place inside an archive, such as `C:\Downloads\tools.zip\bin`, is neither recorded nor loaded. Folderite looks for a part of the path with an archive extension (`.zip`, `.7z`, `.rar`, `.iso` and other common ones) and treats the path as inside an archive unless that part is a real folder. Only those parts are checked on disk. A real folder named `backup.zip` is still recorded, and a place in an archive that has since been deleted is still left out.
- The menu asks for `recentCount + 1` folders, since one may be the current folder, which is left out.

History is saved in `history.json`, written to a temporary file that then replaces the old one. The tray app saves it every 60 seconds if it changed, when Settings asks for it, and when it exits.
Expand Down
15 changes: 10 additions & 5 deletions docs/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Sections are separated by lines. A section that has nothing to show leaves out i
| [Favorites](#favorites) | You have favorites |
| [Open windows](#open-windows) | **Show open windows** is on, and another window is open on a folder |
| [Recent](#recent-folders) | **Recent folders** is above 0 and there is a folder to list |
| [Recent in this app](#recent-folders-for-this-app) | **Show recent folders for this app** is on (off by default), and you have used a folder in the app the menu is over. It shares a section with **Recent**. |
| [Drives](#drives) | **Show drives** is on (off by default) |
| [Clipboard](#clipboard-folder) | **Show clipboard folder** is on, and the clipboard holds a folder path that is not the current folder |
| [Settings… and Reload](#settings-and-reload) | Always |
Expand Down Expand Up @@ -85,9 +86,9 @@ File dialogs, Blender and the desktop add nothing to this list.

### Recent folders

The **Recent** submenu lists the folders you use most, best first. It shows up to **Recent folders** entries (15 by default, 0 to 50 in Settings). It leaves out the folder you are in. A folder can appear in both **Open windows** and **Recent**. With 0, the section is hidden.
The **Recent** submenu lists the folders you use most, best first. It is the same list in every app, and over the tray icon. It shows up to **Recent folders** entries (15 by default, 0 to 50 in Settings). It leaves out the folder you are in. A folder can appear in both **Open windows** and **Recent**. With 0, the section is hidden.

Folderite learns folders without any action from you. It notes a folder when you move to it in Explorer, a file dialog, Directory Opus, Total Commander or XYplorer, when you bring such a window to the front, when you open the menu over it, and when you pick it from the menu. A repeat within 2 seconds counts once. Folders that match a pattern under **Exclusions**, **Don't remember these folders**, are never recorded. Use **History** in Settings to look at the list, remove a folder, or clear it.
Folderite learns folders without any action from you. It notes a folder when you move to it in Explorer, a file dialog, Directory Opus, Total Commander or XYplorer, when you bring such a window to the front, when you open the menu over it, and when you pick it from the menu. A repeat within 2 seconds counts once. Folders that match a pattern under **Exclusions**, **Don't remember these folders**, are never recorded. Places inside an archive are not recorded either, such as a zip file you browse into in Explorer or a 7z, RAR or ISO file in Directory Opus. Use **History** in Settings to look at the list, remove a folder, or clear it.

#### How recent folders are ranked

Expand All @@ -104,10 +105,14 @@ Each visit adds 1 to a folder's count. The count is then multiplied by how long

The folder with the highest result comes first. A tie goes to the folder used most recently.

**The boost for the current app.** Folderite also counts the visits made in each app, using the program name (`explorer`, `notepad`, and so on). When you open the menu over an app, each folder's score gets three times its score in that app, worked out the same way. A few visits in that app outweigh a modest lead elsewhere, so over Notepad's Save dialog the folders you use with Notepad rise. A folder you use far more overall still wins. Opening the menu from the tray icon has no app, so there is no boost.

Folderite keeps at most 1,000 folders. When the total of all counts grows past 9,000, every count shrinks by 10 percent and folders that fall below 1 are dropped. History is saved to `history.json` every minute and when Folderite exits. See [Files and logs](files.md).

### Recent folders for this app

Turn on **Show recent folders for this app** on the **Menu** page of Settings (`showAppRecent`) to get a second submenu under **Recent**, named for the app the menu is over: **Recent in Directory Opus**, **Recent in Explorer**, or for a file dialog the program's name, such as **Recent in Notepad**. It lists the folders you have used in that app, best first, so over Notepad's Save dialog you see the folders you save to from Notepad.

Folderite counts the visits made in each app separately, by program name (`explorer`, `dopus`, `notepad`, and so on). This submenu ranks folders the same way as **Recent**, using only the visits made in that app. A folder you have never used in the app is not listed. It shows up to **Recent folders** entries, leaves out the folder you are in, and is hidden when there is nothing to list. Opening the menu from the tray icon has no app, so the submenu is not shown there.

### Drives

With **Show drives** on, a **Drives** submenu appears after **Recent**. It lists each drive as "Local Disk (C:)" or by its volume label, with the free space on the right, for example "12.3 GB free of 476 GB". It is read when you open the submenu, and a drive that does not answer in time is listed without sizes.
Expand All @@ -129,7 +134,7 @@ Every named item has an accelerator key. While the menu is open, press the lette

- In a name you write yourself, put `&` before the letter: `&Projects` is picked with **P**. Type `&&` for a plain ampersand.
- When no item has the letter marked, items whose name starts with that letter match. This is how you reach recent folders, open windows, subfolders and drives, which carry no `&`.
- The built-in items use these letters: **C** for **Copy path**, **A** for **Add to favorites**, **R** for **Recent**, **V** for **Drives**, **L** for **Clipboard**, **S** for **Settings…**, **D** for **Reload**. The starter favorites use **H**, **D**, **W** and **O**. The starter action uses **T**.
- The built-in items use these letters: **C** for **Copy path**, **A** for **Add to favorites**, **R** for **Recent**, **I** for **Recent in** the app, **V** for **Drives**, **L** for **Clipboard**, **S** for **Settings…**, **D** for **Reload**. The starter favorites use **H**, **D**, **W** and **O**. The starter action uses **T**.
- If one letter matches only one item in the open menu, it is picked at once. If it matches several, the first press highlights the next match after the current one, and each further press moves to the following match. Press **Enter** to pick the highlighted item.

The arrow keys, **Enter** and **Esc** work as in any Windows menu.
Expand Down
3 changes: 2 additions & 1 deletion docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Which sections the folder menu has. The page heading is **Sections**.
| Setting | Default | What it does |
| --- | --- | --- |
| **Recent folders** | 15 | A slider from 0 to 50. The number of folders in the **Recent** submenu. At 0 the submenu is hidden. |
| **Show recent folders for this app** | Off | Adds a second submenu under **Recent**, such as **Recent in Notepad**, with the folders you use most in the app the menu is opened over. It lists up to **Recent folders** entries. See [Recent folders for this app](menu.md#recent-folders-for-this-app). |
| **Show open windows** | On | Adds an **Open windows** list with the folders open right now in Explorer and the other supported file managers, up to 10. |
| **Show clipboard folder** | On | Adds a **Clipboard** item when the clipboard holds a folder path, unless it is the folder you are already in. |
| **Show drives** | Off | Adds a **Drives** submenu with the free space on each drive. |
Expand Down Expand Up @@ -201,7 +202,7 @@ Programs listed here are ignored: Folderite does not open its menu over them wit

## History

The folders Folderite has seen, ranked by how often and how recently you visit them. The **Recent** submenu uses the same ranking and adds a boost for folders used in the app the menu is opened over. This page reads `history.json`, not `config.json`, and its changes apply right away. The list refreshes each time you open the page.
The folders Folderite has seen, ranked by how often and how recently you visit them. The **Recent** submenu uses the same ranking. This page reads `history.json`, not `config.json`, and its changes apply right away. The list refreshes each time you open the page.

Each row shows the folder name, its parent folder, and when you last used it (**just now**, **5 min ago**, **3 h ago**, **yesterday**, **12 days ago**, and a date after 30 days). Hover over a row for the full path. Under the list, a line shows how many folders are listed out of the total.

Expand Down
5 changes: 5 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ The reason is Windows' own text, for example that the file can't be found. Check
- Folders matching a pattern in **Exclusions** are never recorded, and hidden if they were recorded earlier. See [History exclusions](config.md#history-exclusions).
- Folderite records folders from windows it supports only, and not in an app on the disabled list.
- You cleared the history on the **History** page.
- Places inside a zip, 7z, RAR, ISO or other archive file are not recorded, and ones recorded by older versions are dropped.

### The Recent in submenu is missing

It is off by default. Turn on **Settings > Menu > Show recent folders for this app**. It is not shown over the tray icon, and it is hidden in an app where you have not used a folder yet.

### The Drives submenu is missing

Expand Down
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h3>Open and Save dialogs</h3>
<div class="feature-copy">
<p class="feature-num">03</p>
<h3>Recent folders, ranked by use</h3>
<p>Folderite notes the folders you visit in any supported file manager and ranks them by how often and how recently you went there, the way zoxide does. Your everyday folders rise to the top of Recent without you curating anything, and folders you use in an app get a boost when you open the menu there.</p>
<p>Folderite notes the folders you visit in any supported file manager and ranks them by how often and how recently you went there, the way zoxide does. Your everyday folders rise to the top of Recent without you curating anything. Turn on a second submenu to see the folders you use most in the app you are in.</p>
<p class="feature-sub">Keep folders out with patterns like <code>C:\Windows\*</code> or <code>*\node_modules\*</code> under Settings&nbsp;›&nbsp;Exclusions. Remove entries or clear the list under Settings&nbsp;›&nbsp;History.</p>
</div>
<figure class="feature-media">
Expand Down
Loading