# Omarchy Tray Keep Obsidian running in the system tray with an icon that **auto-adapts to your Omarchy theme**. Forked from [Background Tray](https://github.com/Synaphi/background-tray) (Synaphi, MIT). All original close-to-tray features are preserved — the fork adds automatic theme-color detection so the tray icon always matches your Omarchy bar text color, updating live when you switch themes. > Desktop only. Linux (Wayland/SNI) is the primary target. Windows and macOS work but theme detection is Omarchy-specific. ## Why? The original Background Tray uses a static icon. On Omarchy, when you switch between light and dark themes, the tray icon would stay the same color and look out of place against the bar. This fork reads the active theme's bar text color from `~/.local/state/omarchy/current/theme/shell.toml` and regenerates the icon automatically — no restart needed. ## Features - **Run in background** — closing the window (X) hides Obsidian to the tray instead of quitting. - **Adaptive tray icon** — the icon color matches your Omarchy theme's bar text, generated from the official Obsidian logo SVG via `rsvg-convert`. - **Live theme switching** — when you run `omarchy theme set `, the tray icon updates within 500ms without restarting Obsidian. - **Tray icon** — left-click toggles show/hide; right-click menu shows vault name, Show/Hide, Relaunch, Quit. - **Single-instance focus** — relaunching Obsidian while hidden restores the existing window instead of opening the vault picker. - **Custom icon override** — set `trayIconPath` in settings to use your own icon. Leave empty for auto-detection. - Turning the plugin off restores all default behaviour completely. ## Install **Manual:** copy `main.js`, `manifest.json`, and `styles.css` into `/.obsidian/plugins/omarchy-tray/`, then enable it under Settings → Community plugins. **BRAT (beta):** add `https://github.com/lopezjuanma96/omarchy-tray` in the BRAT plugin. ## Requirements - [Obsidian](https://obsidian.md) 1.4.0+ - [Omarchy](https://github.com/omarchy-linux/omarchy) (for theme auto-detection) - `rsvg-convert` (included with Omarchy; used to render SVG → PNG for the tray icon) If Omarchy or `rsvg-convert` is not available, the plugin falls back gracefully to Obsidian's built-in app icon. ## Building ```bash npm install npm run dev # watch build → main.js npm run build # typecheck + production bundle ``` ## License MIT © Synaphi (original) — fork maintained by [Juanma Lopez](https://github.com/lopezjuanma96)