Folder templates and locks
Every folder in MagnumOpus gets its view - view mode, sorting, grouping, sections, Detail columns and thumbnail size - from one of three places, in this order:
- Folder lock - settings saved for this one folder.
- Folder template - settings for all folders of one kind (photos, videos, music, documents, code).
- Default - your general settings, such as the default sorting in Settings > Files and folders > Sorting & grouping.
The first one that applies wins. The status bar shows the name of the template the current folder uses.
Folder templates
When you open a folder, MagnumOpus looks at what is inside and picks a template. It decides from the first data of the folder (for a visited folder from its cache), so the folder opens straight in the right view, without flicker - for a large folder it looks at 1000 items at most.
| Template | When it applies | View |
|---|---|---|
| Images | at least 50 % pictures (comics count as pictures) | Grid, newest first |
| Videos | at least 40 % videos | Grid, newest first; Detail adds Duration, Resolution, Codec |
| Audio | at least 50 % audio | Detail with Duration, Bit rate, Artist, Album |
| Documents | at least 40 % documents (PDF, Office, OpenDocument, RTF) | Detail, newest first |
| Code | the folder contains a project file: Cargo.toml, package.json, go.mod, pom.xml, CMakeLists.txt or .git | Detail with Lines and Encoding |
Hidden and system files don't count, and neither do subtitles that belong to a video in the same folder - so a TV series folder with .srt files next to each episode is still a video folder.
A template only adds its columns to your default set of Detail columns; it never takes Folders, Files or Type away.
Changing a template
Change the view, sorting, grouping, sections, thumbnail size or columns in a folder that uses a template (and isn't locked), and the change goes into the template - every folder of the same kind follows. Enlarge thumbnails in one photo folder and all photo folders show them larger.
Some things never go into a template:
- the Columns view - it stays while you browse (a template doesn't switch it away) and applies to new tabs, but it is never saved into a template or a lock,
--viewand--sortfrom the command line - they apply only to the opened tab,- the Git column, which is added automatically inside a repository,
- the Changed files view of a git repository - it is not a folder, so it can't be locked either.
Your changes are saved as TOML files in %APPDATA%\MagnumOpus\templates, one file per template. To return a template to its built-in settings, delete its file and restart MagnumOpus.
To turn templates off entirely, switch off Template by folder contents in Settings > Files and folders > Templates and locks. Folders then use only locks and the default.
The details pane in a folder
A template can also switch the details (preview) pane on for its folders - the Applications template does, so that folder opens with the pane showing. Turn the pane off or on there and it is remembered for that folder only; it works with or without a lock. Every other folder keeps using the one general setting, so switching between folders never loses the pane width. A folder uses, in this order: your choice for that folder, the template, the general setting. A folder choice cannot be reset to "inherit", only switched on or off. An older program version will not save the folder-state file (folder_state.bin) after you go back: it will not see the locks from this session, but it deletes no data.
In a template file this is [view] preview = true (or false).
Folder lock
A lock saves everything you see in one folder: view mode, sorting, grouping, sections, columns with their order and widths, thumbnail size and the filter. The folder then opens exactly the same way every time, whatever its template says.
- Lock / unlock: Ctrl+K, or the lock among the quick actions next to the three dots in the toolbar. The lock stays visible there while the folder is locked.
- Change a locked folder: just change the view - in a locked folder every change is saved to the lock, not to the template.
- Unlock: the folder goes back to its template or the default right away.
Whether the saved filter comes back when you return is up to Restore filter on return (Settings > Files and folders > Filter). See Filter and its language.
Lock every folder
Lock new folders (Settings > Files and folders > Templates and locks) gives every newly opened folder its own lock, so each folder remembers its own view and sorting.
The folder preview
When the preview pane shows a folder, its view and sorting follow the same order: the folder's lock, then its template, then the preview's own settings. A badge in the preview bar tells you where the settings came from (a lock, or the name of the template). Changing the view in the preview bar makes it the new default for previews and overrides the lock and template for that folder in the preview.
Typical setups
Photos always in Grid, newest first -> nothing to do: the Images template
One project sorted by size -> open it, sort by Size, Ctrl+K
Larger thumbnails in all photo folders -> enlarge them in one photo folder
Every folder exactly as I left it -> Lock new folders
Never change the view by itself -> turn off Template by folder contents