Focus Modes

by Jose David Murillo
5
4
3
2
1
Score: 50/100

Description

Obsidian plug-in that attempts to mimic the functionality of iOS Focus Modes. Allows users to create preset focus modes so that only relevant folders are shown. Users create can create, delete and edit focus mode presets. 95% vibecoded

Reviews

No reviews yet.

Stats

0
stars
57
downloads
0
forks
9
days
9
days
9
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
5
commits

Latest Version

10 days ago

Changelog

Changelog 0.2.0

Focus Mode Settings

  • Presets are now collapsible cards.
  • Added Edit to open an existing preset.
  • Added Confirm and Cancel buttons to preset settings cards.
  • New Presets open at top.
  • Each Focus Mode show it's Icon in the row view in Focus Mode Settings.

Obsidian Review Changes

  • Changed depreciated APIs
  • Folder picker only reads vault folders.
  • Requires Obsidian 1.13.0 or later, older versions open v0.1.0.

Other

  • Existing Presets carry over.

Full Changelog: https://github.com/JDMurillo-Art/Obsidian-Focus-Modes/compare/0.1.0...0.2.0

README file from

Github

Focus Modes

Switch the Obsidian file explorer between named focus presets, like iPhone Focus modes for your vault.

Each preset is a saved set of any number of folders, from anywhere in the vault. While a preset is active, the file explorer shows only those folders (with everything inside them) plus the parent folders needed to reach them. Switch between presets in one click, or from the command palette or a hotkey.

The file explorer focused on a preset, with the Focus Modes menu open

Other plugins, such as Folder Focus Mode and Explorer Focus, focus the explorer on a single folder. Focus Modes is for switching between saved contexts that each span several folders, for example "Client work" = Projects/Acme + Inbox + Reference/Contracts.

Hiding is purely visual and limited to the file explorer:

  • Quick Switcher, search, graph view, tags, and backlinks are unaffected.
  • Files are never closed, moved, or modified. A note open outside the focus stays open; it just isn't listed in the explorer.

Install

From Community plugins

Once the plugin is approved, open Settings → Community plugins → Browse, search for Focus Modes, then install and enable it.

With BRAT (beta versions)

  1. Install BRAT from Community plugins.
  2. Run the command BRAT: Add a beta plugin for testing and enter JDMurillo-Art/Obsidian-Focus-Modes.
  3. Enable Focus Modes under Settings → Community plugins.

Manually

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <your vault>/.obsidian/plugins/focus-modes/.
  3. Reload Obsidian and enable Focus Modes under Settings → Community plugins.

Requires Obsidian 1.13.0 or later. On older versions of Obsidian, version 0.1.0 is installed instead.

Usage

Create a preset. Go to Settings → Focus Modes → New preset. A new preset opens at the top of the list. Give it a name and icon, add folders by typing in the Folders box and picking from the list, then click Confirm (or Cancel to discard it).

Edit a preset. Each preset is a card showing its icon, name, and folders. Click Edit to open it, make your changes, then click Confirm to apply them or Cancel to discard them. Use the arrows to reorder presets and the trash icon to delete one.

Switch presets using any of these:

  • The target button in the file explorer toolbar opens a menu with your presets (the active one is checked), Focus on current file's folder, Exit focus mode, and Manage focus modes….
  • Right-click a folder and choose Focus on this folder for a one-off focus that isn't saved as a preset.
  • Turn on Pin to ribbon for a preset to get a ribbon button for it. The button is highlighted while that preset is active.
  • Commands: Focus: preset name, Exit focus mode, and Toggle last focus mode. Assign hotkeys to any of them.

Only one preset is active at a time. Activating a different preset switches directly to it; activating the active one turns focus off.

The active preset is remembered across restarts. A one-off folder focus is not.

When you rename or move a folder, presets that include it (or anything inside it) update automatically. Deleted folders are removed from presets.

Compatibility and limitations

  • Explorer Focus and File Explorer++ hook into the same part of the file explorer. If either is enabled, Focus Modes shows a one-time warning, because running them together may cause conflicts.
  • The plugin relies on an undocumented part of Obsidian's file explorer (getSortedFolderItems). If a future Obsidian update changes it, Focus Modes shows a single notice and leaves the explorer untouched rather than breaking it.
  • Mobile: tested in Obsidian's mobile emulation (phone and tablet layouts), not yet on a physical device. Please open an issue if something doesn't work on your phone or tablet.

Credits

See CREDITS.md.