Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tauri Plugin: Spotlight
A Tauri plugin that provides a MacOS Spotlight-like search functionality for Tauri windows.
Overview
Spotlight is a Tauri plugin that provides a user-friendly and intuitive way to interact with your desktop applications - the Spotlight search-like interface.
This plugin is currently implemented for macOS, but has basic implementations for other platforms.
Features:
- Allows users to define hotkeys for showing and hiding the window
- Any window can register to implement the features provided by this plugin
- Window will automatically hide when losing focus
- Supports multiple displays (currently only available on macOS)
- Window will always appear on top and reactivate the previously active window upon hiding (currently only available on macOS)
Installation
Install the Core plugin by adding the following to your Cargo.toml file:
src-tauri/Cargo.toml
[]
= { = "https://github.com/zzzze/tauri-plugin-spotlight" }
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
# or
# or
Usage
Backend
There are three ways to configure the plugin:
- Register the spotlight plugin with Tauri:
src-tauri/src/main.rs
- Configure the plugin in your Tauri app's configuration file:
src-tauri/tauri.conf.json
src-tauri/src/main.rs
- Manually register window shortcut keys
src-tauri/src/main.rs
use ManagerExt;
The configuration parameters written in tauri.conf.json
and tauri_plugin_spotlight::init
will be automatically merged with tauri_plugin_spotlight::init
taking higher priority.
Frontend
Use the hide
function to make a spotlight window invisible:
import { hide } from 'tauri-plugin-spotlight-api';
void hide();
Example App
Prepare
- Build frontend API the plugin.
- Install dependencies of example app.
- Start example app.
Thanks
This plugin was inspired by the tauri-macos-spotlight-example project by ahkohd, and borrows heavily from its codebase. Thanks to ahkohd and the contributors to tauri-macos-spotlight-example for their hard work and open-source contributions!