Labtopia84 downloadsConfigurable duration and dismiss controls for toast notifications, so they don't disappear before you finish reading them.
Make toast notifications in Obsidian last as long as you actually need to read them, or stop them from disappearing at all — from any plugin, or from Obsidian core.
Obsidian's toast notifications (Notice) auto-hide after a fixed 4 seconds by default, and
there's no setting anywhere in Obsidian to change that. This is a long-standing complaint:
If a plugin shows you a message with useful detail (an error, a summary, a list of file names) and it vanishes before you finish reading it, that's this problem.
Toastmaster patches the single method Obsidian's Notice class uses internally to schedule
its auto-hide timer. Because every toast (from every plugin, and from Obsidian core) goes
through that same method, this one patch controls duration for all of them — not just
Toastmaster's own notices.
Two modes, both configurable in Settings → Toastmaster:
Toastmaster also keeps a small log of recent toasts (from any plugin, or core), so you can review one you missed. Run "Show recent toasts" from the command palette, or open it from Settings → Toastmaster. Capped at a configurable size (default 50), oldest entries dropped first, and persists across restarts.
Two things Obsidian already does, that most people don't know about, and which this plugin doesn't change:
manifest.json and main.js from the latest release<your-vault>/.obsidian/plugins/toastmaster/Settings → Toastmaster:
Notice.prototype.setAutoHide, an internal Obsidian API not formally documented in
the public plugin API (only the Notice(message, timeout) constructor itself is
documented). Works reliably on current Obsidian versions but may need an update if Obsidian
changes how Notice schedules its auto-hide internally.Straight from the solar-powered TikiBarge, tools that don't exist that should make me nuts 🐒! If you feel the same, shoot me a message and keep the Kittehs in kibble: Support me on Ko-fi.
Issues and pull requests welcome. Please open an issue before submitting a PR for significant changes.
MIT