This is a plugin for Obsidian that ensures your screen stays awake while using the app. It leverages the Screen Wake Lock API to prevent your device from going to sleep, making it ideal for long writing or brainstorming sessions.
- Keeps the display awake while Obsidian is in the foreground.
- Simple and lightweight implementation with minimal impact on performance.
- Multiple activation strategies:
- Always On: Keeps the screen awake as long as Obsidian is open.
- Editor Focus: Activates only when the editor is in focus.
- Editor Typing: Activates after five seconds of inactivity (while in the editor).
- Customizable settings:
- Enable or disable the plugin with a toggle.
- Choose your preferred activation strategy.
- Show or hide the WakeLock status in the status bar.
- Enable or disable notifications for WakeLock events.
- Developer mode for debugging.
- Cross-platform support: Works on desktop and mobile platforms (with some limitations on iOS).
- Hotkey and command palette integration for quick toggling.
- Status bar integration: Displays the current WakeLock state.
- Download the latest release from the releases page.
- Unzip the downloaded file.
- Copy the folder to your Obsidian plugins directory (usually located at
.obsidian/plugins). - Enable the "Screen WakeLock" plugin from the Settings > Community Plugins menu in Obsidian.
- Install BRAT from the Community Plugins in Obsidian.
- Open the command palette and run the command
BRAT: Add a beta plugin for testing - Copy the project link (https://github.com/blotspot/obsidian-wake-lock) into the modal that opens up.
- Make sure Enable after installing the plugin is checked
- Click on Add Plugin
Beta plugins can be updated using the command palette by running the command Check for updates to all beta plugins and UPDATE. Optionally, beta plugins can be configured to auto-update when starting Obsidian. This feature can be enabled in the BRAT plugin settings tab.
Once the plugin is enabled, it will automatically keep your screen awake whenever Obsidian is in the foreground. A successful wake lock is indicated by a "WakeLock on." notification.
You can toggle the functionality through:
- A hotkey (configurable in Obsidian settings).
- The command palette (
Toggle WakeLock). - The status bar icon (if enabled).
- Always On: Keeps the screen awake as long as Obsidian is open.
- Editor Focus: Activates only when the editor is in focus.
- Editor Typing: Activates after five seconds of inactivity (while in the editor).
See: Browser Compatibility for the Wake Lock API.
Due to partial compatibility, the plugin may not work flawlessly on iOS devices. If the wake lock does not activate when starting the app, try disabling and re-enabling the plugin one or two times. Once it works, it will continue to function until the app is restarted. For convenience, consider creating a keyboard shortcut or configuring your mobile toolbar.
- Obsidian API: https://github.com/obsidianmd/obsidian-api
- Screen Wake Lock API: https://www.w3.org/TR/screen-wake-lock/