Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run scrcpy
if pgrep scrcpy; then
osascript -e 'tell application "System Events" to tell process "scrcpy"' \
-e 'set frontmost to true' \
-e 'if windows is not {} then perform action "AXRaise" of item 1 of windows' \
-e 'end tell'
else
/usr/local/bin/scrcpy
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.