ShareShortcuts

Sidecar Headless Mode

wjames1
Bifurcar “Sidecar Headless Mode”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que wjames1 reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
60K
Guardado
0
Acciones
9
Categoría
API
Versión
1.0
Idioma
EN

Run Sidecar from iPad even while Mac is sleeping/locked or closed, affectively allowing Sidecar to be used In headless mode.

Instructions:

  • Please make sure to enable remote login under sharing in system preferences.
  • If you will be running this shortcut while computer is locked or closed, Make sure power nap is enabled under power save settings and plugged in.
  • To access your Mac's IP address click on sharing again in system preferences. At the top it should say your Mac is accessible at name-MacBook-Pro.local or something similar. Copy paste this into the shortcut Mac IP import question.

Please note this shortcut can take up to 6 seconds to complete be patient before running again. If Shortcut is run while Mac is already connected, Mac will be disconnected and sent to sleep mode.

Novedades

Versión 1.0

First release

Historial de versiones
1.0 2 de may. de 2020

First release

Qué hace

9 acciones
  1. Text
  2. If
  3. Set Variable
    Password
  4. If
  5. Ask for Input
    MacOS Password?
  6. Set Variable
    Password
  7. Get Device Details
  8. Nothing
  9. Run Script Over SSH

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#include 'actions/network'
#include 'actions/device'
#define color blue
#define glyph circledPower

const Text = "nil"

if Text {
	@Password = Text
} else {
	prompt("MacOS Password?")
	@Password
}
getDeviceDetail("")
nothing()
runSSHScript("caffeinate -u -t 4\nosascript -e 'tell application \"System Events\" to key code 123'\nosascript -e 'tell application \"System Events\" to keystroke \"{@Password}\"'\nosascript -e 'tell application \"System Events\" to keystroke return'\n\nsleep 4\n\n\nosascript <<EOD\ntell application \"System Events\"\n  tell process \"SystemUIServer\"\n    click (menu bar item 1 of menu bar 1 whose description contains \"Displays\")\n    if menu item \"Stop Airplay\" of menu 1 of result exists then\n      click menu item \"Stop Airplay\" of menu 1 of result\n      tell application \"Finder\" to sleep\n    else\n      click menu item \"{}\" of menu 1 of result\n    end if\n  end tell\nend tell\nEOD\n", nil, "foos-MacBook-Pro.local", "", "foo bar", "", @Password)
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

También te puede gustar

Ver todo
Publicidad