Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Close to Tray

King KuntaKing Kunta

Keep the app running in the system tray when its window is closed, so the command line interface keeps working.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Keeps Obsidian running in the system tray when you close its window, instead of quitting. Useful for the Obsidian command line interface, which needs the app running.

Desktop only.

Usage

  • Close a vault window (title bar ×, Alt+F4): the window and its pop-outs hide to the tray. The vault stays loaded, so plugins, sync, and CLI commands keep working.
  • Click the tray icon to bring hidden windows back.
  • Right-click the tray icon for Show Obsidian, Hide Obsidian, and Quit Obsidian.
  • Command palette: Hide this vault to the tray and Quit Obsidian.
  • Launching Obsidian again (Start menu, shortcut, obsidian:// link) brings hidden windows back. CLI commands do not.

To exit Obsidian completely, use Quit Obsidian.

With several vaults open, there is still only one tray icon, and its menu acts on all windows. Close-to-tray applies only to vaults with the plugin enabled.

How it works

The plugin runs entirely inside Obsidian and makes no network requests. It uses the Electron APIs Obsidian already exposes to plugins (require('electron').remote):

  • A capturing beforeunload listener cancels the window close and hides the window instead. Reloads are left alone. Quitting the app is left alone too, so Obsidian's own shutdown and save logic still runs.
  • A main-process close listener stops Obsidian from force-destroying the window 3 seconds after a cancelled close.
  • The tray icon is created in Obsidian's main process from Obsidian's own icon.png.

Window-close handling relies on Obsidian internals (the is-closing/is-quitting IPC channels and the window-close timer). It was verified against Obsidian 1.14.4 on Windows. macOS and Linux use the same code paths but have not been tested.

macOS

  • The menu bar icon is a monochrome template image (Obsidian's icon shape), so it follows light and dark menu bars.
  • Clicking the menu bar icon opens its menu; clicking the Dock icon brings hidden windows back.
  • Closing a window with the red button hides it. Cmd+Q quits as usual.

Installing manually

  1. Download main.js and manifest.json from the latest release.
  2. Put them in <vault>/.obsidian/plugins/close-to-tray/.
  3. Reload Obsidian and enable Close to Tray under Settings → Community plugins.

Development

npm install
npm run dev     # rebuild main.js on change
npm run build   # type-check + production build
npm run lint

For live testing, symlink or copy main.js and manifest.json into a test vault's .obsidian/plugins/close-to-tray/.

Releasing

  1. Update minAppVersion in manifest.json if needed, then run npm version <patch|minor|major>. This bumps manifest.json, package.json, and versions.json.
  2. git push --follow-tags. The release workflow builds the plugin and creates a draft GitHub release with main.js and manifest.json attached.
  3. Publish the draft.

License

Apache-2.0

HealthExcellent
ReviewSatisfactory
About
Keep Obsidian running in the system tray when closing a vault window, so plugins, sync, and CLI commands keep working. Hide windows to a single tray/menu-bar icon and restore or quit Obsidian from its menu. Use on desktop platforms only.
InterfaceCommandsUtilities
Details
Current version
1.0.0
Last updated
8 hours ago
Created
8 hours ago
Updates
1 release
Compatible with
Obsidian 1.14.0+
Platforms
Desktop only
License
Apache-2.0
Report bugRequest featureReport plugin
Author
King KuntaKing Kuntakingkdot
GitHubkingkdot
  1. Community
  2. Plugins
  3. Interface
  4. Close to Tray

Related plugins

Note Toolbar

Add customizable toolbars to your notes.

Commander

Customize your workspace by adding commands everywhere, create macros and supercharge your mobile toolbar.

Lean Terminal

Embedded terminal panel powered by xterm.js and node-pty - no external windows.

Hotkey Helper

Easily see and access any plugin's settings or hotkey assignments (and conflicts) from the Community Plugins tab.

Tray

Run Obsidian from the system tray for customisable window management and global quick notes.

Slash Commander

Customize the slash command list, assign each command an icon.

Refresh Any View

Allows to refresh any view without reopening it.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Copilot

Run AI agents such as Claude Code, Codex, and OpenCode inside your vault. Turn your second brain into a smart assistant that gets knowledge work done.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.