Skip to content

leechristophermurray/launch

Repository files navigation

Launch

A sleek, pill-shaped application launcher for Linux, built with Rust and GTK4. Designed with strict adherence to "Tree Architecture" for stability and maintainability.

AppSearch

Features

  • Sleek Design: Transparent, pill-shaped UI (border-radius: 30px).
  • Fast Search: Fuzzy search through your installed applications (.desktop files), with debounced async search for lag-free typing.
  • GNOME Search Providers: Automatically discovers and queries GNOME search providers (Calculator, Contacts, Settings, Nautilus, etc.) via D-Bus — pulling results from the same providers GNOME Shell uses.
  • Filter Chips: When search results come from multiple sources, a Spotlight-style chip row appears between the search bar and results. Use Left/Right arrow keys to filter by category (e.g., "All", "Applications", "Calculator", "Settings").
  • Visual Feedback: Displays application icons and source subtitles on results from non-application providers.
  • Window Switcher: From the zero state, press PageDown / PageUp to transform the pill into a workspace-grouped window switcher. Navigate with arrow keys or page keys, press Enter to focus a window, Escape to cancel.
  • Keyboard Navigation:
    • Up / Down: Navigate results.
    • Enter: Launch selected application (or Enter directory).
    • Left / Right Arrow: Navigate filter chips (when visible) or file browser directories.
    • PageDown / PageUp: Activate window switcher (at zero state) or navigate within it.
    • Ctrl + 1-9: Quick launch the Nth result.
    • Alt+V: Open clipboard history.
    • Alt+Left/Right: Navigate between regions (Entry, Media, Context Actions).
    • Escape: Close the launcher (or dismiss switcher/clipboard).
  • Overview Grid: Press Down to reveal a sectioned, horizontally scrollable grid of your apps, folders, shortcuts, and more.
  • Favorites System: Pin your most used apps and folders to the top of the list by pressing Space.
  • Status Indicators: Highlights running applications with a blue notification dot.
  • Editor Integration: When VS Code, VS Code Insiders, or Google Antigravity is focused, search workspace files and commands directly from Launch.
  • Browser Integration: Search open Chrome/Chromium tabs, browse history, and navigate with context action buttons (Back, Forward, Home, New Tab).
  • Clipboard History: Press Alt+V to browse your clipboard history with text previews and timestamps. Select an item to paste it instantly.
  • Plugin API: Applications can register context-specific actions via D-Bus, with support for sliders and touchpad gestures.

Usage

Prefixes

Launch uses strict prefixes to route your queries to different providers:

Prefix Name Description Example
? AI Local LLM search & assistant (supports RAG/File Awareness). ? where is my project?
x Execute Run a shell command in a terminal wrapper. x top (runs gnome-terminal -- top)
f Files Browse the filesystem. Use Left/Right keys to navigate. f /home/user/
ss Shortcuts Run a saved shortcut. ss term
m Macros Execute a sequence of commands (Macro). m dev-setup
c Calc Solve math expressions (supports complex LaTeX: \sin, \log, 2\pi e, \frac{1}{2}, infinite/NaN handling). c \sqrt{16} * 2
d Dict Smart Dictionary. Offline lookup (Webster) + Online Fallback (Google). d rust
w Window Switch to open windows. Shows workspace number and app icon. w term
b Browser Search open browser tabs and browsing history. b gmail
> Editor Cmd Search and execute VS Code / Antigravity commands. > format
! System Power operations (suspend, reboot, poweroff). ! reboot
l Launch Internal commands (Settings, About, Quit). l settings

AI Assistant (?)

Launch features a built-in AI assistant powered by Ollama. It is private, local, and aware of your files.

  • File Awareness (RAG): The assistant automatically indexes your home directory (up to 4 levels) to answer context-specific questions about your files and projects.
  • Local & Private: No data leaves your machine. Everything runs via your local Ollama instance.
  • Streaming Progress: Integrated download progress bar when switching models.

AI Setup

To use the AI features, you need to have Ollama installed on your Linux system.

  1. Install Ollama:

    curl -fsSL https://ollama.com/install.sh | sh
  2. Pull a Default Model: Launch defaults to llama3. You can pull it manually or use the Settings UI:

    ollama pull llama3
  3. Automatic Start: Launch will attempt to start the Ollama server (ollama serve) automatically if it's not running when you send a query.

  4. Configure Models:

    • Type l settings and go to the AI tab.
    • Select your preferred model (e.g., llama3, mistral, or tinyllama for speed).
    • Launch will handle the download and setup for you!

Configuration

Launch is fully configurable via an interactive UI.

  1. Type l settings (or l set) and hit Enter.
  2. Use the Tabs to switch between Shortcuts, Macros, and AI.
  3. Add: Click "Add" to define a new item.
  4. Delete: Select an item and click "Delete" to remove it.

Changes are persisted to ~/.config/launch/settings.json.

Example settings.json

{
  "shortcuts": {
    "term": "gnome-terminal",
    "web": "firefox"
  },
  "macros": [
    {
      "name": "morning",
      "actions": [
        "notify-send 'Good Morning'",
        "firefox https://news.ycombinator.com"
      ]
    }
  ]
}

VS Code / Antigravity Integration

Launch includes a companion VS Code extension that enables deep editor integration:

  • Workspace File Search: When VS Code is focused, the f prefix shows workspace files prefixed with [WS] before filesystem results.
  • Command Search: Use > to search and execute VS Code commands (Format Document, Toggle Terminal, etc.).
  • Context Actions: Quick-access buttons appear for common editor actions (New File, Terminal, Git Commit, Search, Format).

Extension Setup

# From the Launch project directory
cd vscode-extension && npm install && npm run compile
code --install-extension vscode-extension/launch-editor-bridge-0.1.0.vsix

The extension works with VS Code, VS Code Insiders, and Google Antigravity (VS Code fork).

Chrome / Chromium Integration

Launch includes a Chromium extension and native messaging bridge for deep browser integration:

  • Tab Search: Use the b prefix to search open tabs. Results appear as [TAB] Title - URL. Select one to switch to that tab.
  • History Search: The b prefix also searches recent browsing history. Results appear as [HIST] Title - URL. Select one to open the URL in a new tab.
  • Context Actions: When Chrome/Chromium is the focused window, action buttons appear in Launch's right region: Back, Forward, Home, New Tab.
  • Context Boost: When a browser is focused, matching tabs are surfaced in default search results automatically.

Browser Extension Setup

  1. Load the extension in Chrome/Chromium:

    • Navigate to chrome://extensions
    • Enable Developer mode (top-right toggle)
    • Click Load unpacked and select the chromium-extension/ directory
  2. Copy the extension ID shown on the extension card (e.g., chbccjcidleinfoddaagjpakddpmpnfg)

  3. Install the native messaging host:

    EXTENSION_ID=<your-extension-id> ./browser-bridge/install.sh
  4. Reload the extension — click the refresh icon on the extension card in chrome://extensions

  5. Restart Launchcargo run or restart your Launch daemon

Prerequisites: Python 3, dbus-python, PyGObject (pre-installed on most GNOME-based distributions).

Troubleshooting: Check the bridge log at ~/.local/share/launch/browser-bridge.log.

Clipboard History

Launch includes a built-in clipboard manager powered by the GNOME Shell extension:

  • Automatic Capture: Text, images, and file copies are tracked automatically in the background.
  • Quick Access: Press Alt+V while Launch is open to view your clipboard history.
  • Visual Previews: Each entry shows a content preview, type icon, and relative timestamp (e.g., "2m ago").
  • Instant Paste: Select any item with Enter to set it as the active clipboard content and paste it into the focused application.
  • Keyboard Navigation: Use Up/Down to browse items, Escape to dismiss.
  • Live Filtering: Type while the clipboard list is open to filter entries.
  • Deduplication: Identical consecutive copies are merged, keeping the latest timestamp.

The clipboard history is stored in memory (up to 50 items) and resets on logout. Image clipboard items are saved as temporary files in /tmp/launch-clipboard/.

Plugin API

Launch exposes a D-Bus Plugin API (org.leechristophermurray.Launch.Plugin) that any application can use to:

  • Register Context Actions: Push app-specific buttons to Launch's right region.
  • Receive Action Callbacks: Get notified when users trigger your registered actions.
  • Request Sliders: Show interactive sliders for continuous adjustments (brightness, volume, etc.).
  • Receive Gesture Data: Capture touchpad swipe deltas for fine-grained control.

See the Plugin Developer Guide for complete API documentation, D-Bus interface reference, and examples in multiple languages.

For a quick example, see examples/sample_plugin.py.

GNOME Search Providers

Launch acts as a super-host for the GNOME Shell Search Provider protocol. It automatically discovers all registered search providers on your system and queries them alongside its own results.

  • Automatic Discovery: Scans /usr/share/gnome-shell/search-providers/*.ini for registered providers (Calculator, Contacts, Settings, Nautilus, Characters, Clocks, etc.).
  • Smart Activation: Only queries providers that are already running — avoids auto-starting heavy applications.
  • Result Integration: Provider results appear alongside app results with source labels (e.g., "Calculator", "Settings").
  • Filter Chips: When results come from multiple sources, a chip row appears below the search bar. Use Left/Right arrow keys to filter by category. The first chip is "All" (unless only one source matched).
  • Activation: Selecting a search provider result calls ActivateResult via D-Bus, opening the result in its native application.
  • Debounced & Async: Search provider queries run on a background thread with 150ms debounce — typing is never blocked by slow D-Bus calls.

No configuration needed — search providers are discovered at startup from standard GNOME directories.

Daemon Mode

Launch runs as a background daemon.

  • Run launch toggle to show/hide the window.
  • Bind launch toggle to a global shortcut in your Desktop Environment (e.g., Super+Space).
  • The window automatically hides when it loses focus or when an app is launched.

Overview Grid

When the search bar is empty, press Down to open the Overview Grid. This view gives you quick access to all your content categorized into horizontal sections:

  • Applications: All installed apps. Scroll horizontally to see more.
  • Folders: Your home directory folders.
  • Shortcuts / Macros: Quick access to your defined actions.
  • AI: Ask the assistant.
  • Settings / System: Quick toggles and configuration.

Navigation:

  • Up / Down: Jump between sections.
  • Left / Right: Scroll through items within a section.

Favoriting:

  • Navigate to any item (App or Folder).
  • Press Space to toggle Favorite status.
  • Favorites are marked with a star and always appear at the start of the list.

Tech Stack

  • Language: Rust (2024 Edition)
  • GUI: GTK4 + gtk4-layer-shell (Wayland anchoring)
  • IPC: D-Bus (dbus crate + dbus-crossroads)
  • AI: Ollama (local LLM)
  • Architecture: Tree Architecture (Domain -> Application -> Interface -> Infrastructure)
  • Search: Debounced async search with generation-based cancellation — D-Bus queries run off the main thread
  • Companion Components:
    • GNOME Shell Extension (GJS) — window focus tracking, global hotkey, clipboard history & paste simulation
    • GNOME Search Providers — automatic discovery and querying via org.gnome.Shell.SearchProvider2 D-Bus protocol
    • VS Code Extension (TypeScript + dbus-next) — editor integration
    • Chromium Extension (Manifest V3) + Python Native Messaging Host — browser integration

Installation

Prerequisites

  • Rust & Cargo
  • GTK4 development libraries (libgtk-4-dev on Debian/Ubuntu, gtk4-devel on Fedora)
  • GTK4 Layer Shell (libgtk4-layer-shell-dev on Debian/Ubuntu, gtk4-layer-shell-devel on Fedora)
  • D-Bus development libraries (libdbus-1-dev on Debian/Ubuntu, dbus-devel on Fedora)

Building from Source

git clone https://github.com/leechristophermurray/launch.git
cd launch
cargo run --release

Building Packages (.deb / .rpm)

The project includes a helper script to generate Linux packages.

./build_packages.sh

Artifacts will be output to:

  • target/debian/*.deb
  • target/generate-rpm/*.rpm

Architecture

This project follows the Tree Architecture pattern:

  • Domain: Pure business entities (App, Shortcut).
  • Application: Use cases (SearchApps, ExecuteCommand).
  • Interface: Abstract Ports (IAppRepository).
  • Infrastructure: Concrete Adapters (LinuxAppRepoAdapter, AppWindow).

License

MIT License. See LICENSE for details.

About

A sleek, pill-shaped application launcher for Linux, built with Rust and GTK4. Designed with strict adherence to "Tree Architecture" for stability and maintainability.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors