Skip to content

feat: create Alfred/Raycast plugin for toggling RightLayout #42

Description

@chernistry

Summary

Create plugins for Alfred and Raycast — the two most popular macOS launcher apps — that let users quickly toggle RightLayout on/off, check status, and switch language preferences without touching the menu bar.

Why This Matters

  • Alfred has 1M+ users, Raycast is the fastest-growing macOS productivity tool
  • Launcher users expect to control everything via keyboard — menu bar clicking feels slow
  • Plugin presence in Alfred Gallery / Raycast Store is free distribution and discovery
  • Shows RightLayout is a "serious" macOS tool that integrates with the ecosystem

Proposed Plugin Features

Core Commands

Command Action
rl toggle Toggle RightLayout on/off
rl status Show current status (active, paused, language)
rl pause 5m Pause for 5 minutes
rl stats Show today's correction count
rl lang Show/switch active language pair

Implementation Options

Option 1: AppleScript Interface

RightLayout exposes an AppleScript dictionary:

tell application "RightLayout"
    set enabled to not enabled
end tell

This requires adding AppleScript support to RightLayout first (see below).

Option 2: Shell Command Interface

RightLayout ships a CLI tool:

rightlayout toggle
rightlayout status --json
rightlayout pause --duration 300

The CLI communicates with the running app via:

  • Unix domain socket
  • XPC service
  • Simple HTTP endpoint on localhost (like the Bernstein task server pattern)

Option 3: URL Scheme

RightLayout registers a URL scheme:

rightlayout://toggle
rightlayout://status
rightlayout://pause?duration=300

Recommended: Option 2 (CLI)

A CLI tool is the most versatile — it works with Alfred, Raycast, Shortcuts, Keyboard Maestro, and shell scripts.

Alfred Workflow

📁 RightLayout.alfredworkflow/
├── info.plist          # Workflow definition
├── icon.png            # RightLayout icon
├── toggle.sh           # rightlayout toggle
├── status.sh           # rightlayout status --json | format
└── README.md

Distribute via: Alfred Gallery or GitHub Releases

Raycast Extension

📁 rightlayout-raycast/
├── package.json
├── src/
│   ├── toggle.tsx       # Toggle command
│   ├── status.tsx       # Status command
│   └── stats.tsx        # Stats command
├── assets/
│   └── icon.png
└── README.md

Raycast extensions are TypeScript/React — submit to Raycast Store for distribution.

Prerequisites

Before building plugins, RightLayout needs a control interface. The simplest approach:

File: Add a lightweight local HTTP server or CLI binary that communicates with the running app.

Acceptance Criteria

  • Alfred workflow can toggle RightLayout on/off
  • Raycast extension can toggle RightLayout on/off
  • Status command shows current state
  • Works when RightLayout is not running (shows "not running" instead of error)
  • Published to Alfred Gallery / Raycast Store (stretch goal)

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4somedayenhancementNew feature or requesthacktoberfestHacktoberfest eligiblehelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions