Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcuts integration #67

Open
kirb opened this issue Apr 30, 2021 · 3 comments
Open

Shortcuts integration #67

kirb opened this issue Apr 30, 2021 · 3 comments
Assignees

Comments

@kirb
Copy link
Member

kirb commented Apr 30, 2021

Implement a shortcut to execute a script:

  • Inputs:
    • Server - Which server this should be executed on.
    • Script - The actual script to execute.
    • Input - A string to pass into stdin.
    • Shell - The shell to execute the script on. If empty, just uses the user’s default shell.
    • Timeout - Consider the job failed if this timeout is reached.
  • Outputs:
    • Exit code - The code the script exited with, or some other value (todo: what?) for other errors such as failed to connect; timed out.
    • Output - Contents of stdout once the script finishes.

Think about how we can do this securely to avoid abuse, such as a user downloading a malicious shortcut and executing it without checking its contents first. e.g. Require the user to flick a switch to enable shortcuts first.

@kirb kirb self-assigned this Apr 30, 2021
@hnlkaitan
Copy link

Just saw your email, thank you so much! I actually also just ran into something else that partially made me ask this in the first place; if I could make a feature request, would it be possible to enable these actions to be run from an Apple Watch and push the command to the paired phone (for example, if my phone's unresponsive, run a Shortcut on my watch that sends killall -9 backboardd to my phone).

I know there are a lot of things to consider regarding this (especially since you're still working on getting these implemented in the first place) or even if this possible from a technical standpoint but if this could be taken a look at some time down the road that'd be great!

Also, I know that some Actions can't be run on Apple Watch: for example, the Get Clipboard action can't be run (I'm not sure exactly what decides this though). If you open a Shortcut → ⋮ it'll say below the Show on Apple Watch toggle which actions in that Shortcut can't be run.

@TheAwesome98-Real
Copy link

if my phone's unresponsive, run a Shortcut on my watch that sends killall -9 backboardd to my phone.

This is a good idea, I also want this

@zanodor
Copy link

zanodor commented May 11, 2023

Shortcut integration workaround:

  1. Use a LocalSSH action to edit .zshrc file with commands to execute on startup, 2. run NewTerm, 3. last action: delete last line you put in .zshrc file.

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

No branches or pull requests

4 participants