Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.3 kB · 38 lines
123456789101112131415161718192021222324252627282930313233343536373839#!/bin/sh# Installed compatibility command for Juke inside Menu Band. It never launches# a separate JukeWizard process: every verb goes over the control socket, and# jukewizard-control.mjs wakes Menu Band's Juke when it is asleep.set -euINSTALL_ROOT="${JUKEWIZARD_HOME:-$HOME/.local/lib/jukewizard}"CONTROL="$INSTALL_ROOT/jukewizard-control.mjs"case "${1:-}" in login) shift if command -v ac-login >/dev/null 2>&1; then exec ac-login "$@"; fi exec node "$INSTALL_ROOT/ac-login.mjs" "$@" ;; cloud) shift exec node "$INSTALL_ROOT/juke-cloud.mjs" "$@" ;; --help|help) node "$INSTALL_ROOT/juke-cloud.mjs" --help exit 0 ;; open|"") # Show the Juke window — the notification both wakes a sleeping Juke and # raises a hidden one. osascript -l JavaScript -e 'ObjC.import("Foundation");$.NSDistributedNotificationCenter.defaultCenter.postNotificationNameObjectUserInfoDeliverImmediately("computer.aestheticcomputer.menuband.showJuke", $(), $(), true)' >/dev/null exec node "$CONTROL" status ;;esac# A specific audio file → queue it (added if it's a fresh draft) and play.if [ -f "$1" ]; then case "$1" in /*) SEL="$1";; *) SEL="$(pwd)/$1";; esac exec node "$CONTROL" play "$SEL"fiexec node "$CONTROL" "$@"