- Create a playground from xcode which you are going to use as a template. Call it
Template.playground
or modify the script. - Put the script into the same directory.
chmod +x justplay
. You can run the script from terminal. I decided to add it as a behavior to Xcode and to use default shortcut to run it.- In Xcode go to Xcode->Behaviors->Edit behaviors
- Add a new behavior
- Choose the
justplay
script to run for that behavior. - Assign a shortcut to it. I use a default shortcut for creating a playground: ⌥⇧⌘N
Last active
June 7, 2016 22:29
-
-
Save yas375/f78a227c12a1a27a6d2f9dc7d19fb247 to your computer and use it in GitHub Desktop.
Annoyed by Xcode asking a name for each playground you create? Me too! Most often I use playgrounds I just want to try out something real quick.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
TEMPLATE_NAME="Template.playground" | |
DESTINATION_PATH=`mktemp -d`/$TEMPLATE_NAME | |
cp -R "`dirname $0`/$TEMPLATE_NAME" $DESTINATION_PATH | |
open $DESTINATION_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment