Control StableBar from Shortcuts, Spotlight and stablebar:// links

Abierto
#205 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
macos, swift

Línea de trabajo

Start with the command-line controls in docs/command-line.md and trace how they become RuntimeRequest actions; inspect Resources/Info.plist and the app entry points under Sources for URL event handling. The issue calls for App Intents and stablebar:// links covering the same runtime actions, plus a decision on whether URL-triggered scripts need a setting. Done means both entry paths invoke the existing actions and the trigger safety behavior is defined.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement P3

Problem

Every runtime action goes through the command line: --popup, --profile, --refresh and --trigger (see Command-line controls). Shortcuts can only reach them through Run Shell Script with the full path to the binary, and launchers such as Raycast and Alfred need a script command for each action. Links in notes or web pages can't reach the bar at all.

macOS 26 brought Shortcuts automations (Focus, time of day, Wi-Fi) to the Mac and runs App Intents from Spotlight. A shortcut can also have a keyboard shortcut, so App Intents would give global hotkeys without StableBar needing a hotkey editor.

Proposal

  • App Intents for the existing actions: open or close a widget's popup, switch the profile or return it to automatic, refresh a widget, and send an event with data. Widget and profile parameters list the IDs and names in the current configuration. An AppShortcutsProvider makes the common ones appear in Spotlight and Shortcuts without setup.
  • A stablebar:// URL scheme for the same actions, such as stablebar://popup/meeting, stablebar://profile/focus, stablebar://refresh/weather and stablebar://trigger/deploy?STATUS=done. It needs CFBundleURLTypes in Info.plist and a handler for the open-URL Apple Event.
  • Both go through the same RuntimeRequest actions as the command line, so they behave the same and the CLI stays the reference.
  • Configuration edits (--set, --add, --batch) stay on the command line.
  • Open question: a link can come from any web page or document, so decide whether trigger over a URL, which can run widget scripts with the data it carries, should be allowed or need a setting.

Both use public APIs only: App Intents (macOS 13+) and URL types in Info.plist. Resources/Info.plist on main declares no URL types, and Sources has no App Intents.

Possible today

Partly. A Run Shell Script action, or a Raycast or Alfred script command, can call /Applications/StableBar.app/Contents/MacOS/StableBar --popup <id> and the other flags. That needs a shell for each action, shows up in Spotlight only through a user-made shortcut, and can't be a link.

Related

  • #72 added --popup; its example binds it in AeroSpace, skhd or Raycast through the binary.
  • #81 lets commands set conditions that profiles match; App Intents would let Shortcuts automations set them without a shell.
  • #70 hides and shows the bar; when it lands, it fits the same intents and URLs.
  • Demand elsewhere: Ice #501, Raycast integration (open, 28 reactions).

Triaged by Claude Code via T3 Code (Claude Opus 5.5).

Lenguaje dominante
Swift
Estrellas
184
Forks
12
Merge medio
3 h 50 min
PR fusionados (30 d)
387

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Seb-GRAF/StableBar

Todos los issues de Seb-GRAF/StableBar

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.