├── AlignTo.sketchplugin └── Contents │ ├── Resources │ ├── AlignTo.framework │ │ ├── AlignTo │ │ ├── Resources │ │ │ ├── AlignToWindowController.nib │ │ │ ├── Assets.car │ │ │ └── Info.plist │ │ └── _CodeSignature │ │ │ └── CodeResources │ └── icon.png │ └── Sketch │ ├── manifest.json │ └── script.js ├── appcast.xml ├── preview_images ├── preview1.png └── preview2.gif └── readme.md /AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/AlignTo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/AlignTo -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/Resources/AlignToWindowController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/Resources/AlignToWindowController.nib -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/Resources/Assets.car -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 18G4032 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | AlignTo 11 | CFBundleIdentifier 12 | com.kevingutowski.AlignTo 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | AlignTo 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 262 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 11C504 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 19B90 35 | DTSDKName 36 | macosx10.15 37 | DTXcode 38 | 1130 39 | DTXcodeBuild 40 | 11C504 41 | LSMinimumSystemVersion 42 | 10.14 43 | NSHumanReadableCopyright 44 | Copyright © 2020 Kevin. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Resources/AlignTo.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/AlignToWindowController.nib 8 | 9 | gGAJNX3nXgGNCoVk6SAOM/PNt24= 10 | 11 | Resources/Assets.car 12 | 13 | oQIjrPN3tdhCfpS5leSwNLhn3lg= 14 | 15 | Resources/Info.plist 16 | 17 | uFluljLrB6oALHJtOozxGctYGjg= 18 | 19 | 20 | files2 21 | 22 | Resources/AlignToWindowController.nib 23 | 24 | hash2 25 | 26 | c64W7RHWIFU8ffiCY5Z+d4bB12NedrcGramFdBwe8nw= 27 | 28 | 29 | Resources/Assets.car 30 | 31 | hash2 32 | 33 | MxBKYFSrVn39FijmDeFqrcKhe+YTq9cazGpqPOWL25s= 34 | 35 | 36 | Resources/Info.plist 37 | 38 | hash2 39 | 40 | rcLGkw02MZq19S1w0v3tztSFSZKcXesmEpouUpoPi9s= 41 | 42 | 43 | 44 | rules 45 | 46 | ^Resources/ 47 | 48 | ^Resources/.*\.lproj/ 49 | 50 | optional 51 | 52 | weight 53 | 1000 54 | 55 | ^Resources/.*\.lproj/locversion.plist$ 56 | 57 | omit 58 | 59 | weight 60 | 1100 61 | 62 | ^Resources/Base\.lproj/ 63 | 64 | weight 65 | 1010 66 | 67 | ^version.plist$ 68 | 69 | 70 | rules2 71 | 72 | .*\.dSYM($|/) 73 | 74 | weight 75 | 11 76 | 77 | ^(.*/)?\.DS_Store$ 78 | 79 | omit 80 | 81 | weight 82 | 2000 83 | 84 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 85 | 86 | nested 87 | 88 | weight 89 | 10 90 | 91 | ^.* 92 | 93 | ^Info\.plist$ 94 | 95 | omit 96 | 97 | weight 98 | 20 99 | 100 | ^PkgInfo$ 101 | 102 | omit 103 | 104 | weight 105 | 20 106 | 107 | ^Resources/ 108 | 109 | weight 110 | 20 111 | 112 | ^Resources/.*\.lproj/ 113 | 114 | optional 115 | 116 | weight 117 | 1000 118 | 119 | ^Resources/.*\.lproj/locversion.plist$ 120 | 121 | omit 122 | 123 | weight 124 | 1100 125 | 126 | ^Resources/Base\.lproj/ 127 | 128 | weight 129 | 1010 130 | 131 | ^[^/]+$ 132 | 133 | nested 134 | 135 | weight 136 | 10 137 | 138 | ^embedded\.provisionprofile$ 139 | 140 | weight 141 | 20 142 | 143 | ^version\.plist$ 144 | 145 | weight 146 | 20 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/AlignTo.sketchplugin/Contents/Resources/icon.png -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Sketch/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands" : [ 3 | { 4 | "script" : "script.js", 5 | "handler" : "go", 6 | "shortcut" : "", 7 | "name" : "🦁 A Lion Layers", 8 | "identifier" : "AlignTo_Main" 9 | }, 10 | { 11 | "script": "script.js", 12 | "handlers": { 13 | "actions": { 14 | "Startup" : "go", 15 | "SelectionChanged.begin" : "go" 16 | } 17 | } 18 | } 19 | ], 20 | "menu": { 21 | "items": [ 22 | "AlignTo_Main" 23 | ], 24 | "isRoot" : true 25 | }, 26 | "identifier" : "com.kevingutowski.AlignTo", 27 | "version" : "0.1.1", 28 | "icon" : "icon.png", 29 | "description" : "Align your layers to a key object.", 30 | "authorEmail" : "kevin@gradescope.com", 31 | "author" : "Kevin Gutowski", 32 | "name" : "A Lion", 33 | "disableCocoaScriptPreprocessor" : true, 34 | "homepage" : "https://github.com/KevinGutowski/A-Lion", 35 | "appcast" : "https://raw.githubusercontent.com/KevinGutowski/A-Lion/master/appcast.xml" 36 | } 37 | -------------------------------------------------------------------------------- /AlignTo.sketchplugin/Contents/Sketch/script.js: -------------------------------------------------------------------------------- 1 | var go = function(context) { 2 | try { AlignTo.go(context); } 3 | catch(e) { 4 | if(Mocha.sharedRuntime().loadFrameworkWithName_inDirectory('AlignTo', NSBundle.bundleWithURL(context.plugin.url()).resourceURL().path())) { 5 | AlignTo.go(context); 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /appcast.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /preview_images/preview1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/preview_images/preview1.png -------------------------------------------------------------------------------- /preview_images/preview2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KevinGutowski/A-Lion/047b9480244075b3703e2e901f968c08aeae9b39/preview_images/preview2.gif -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # 🦁 A Lion 2 | 3 | A Sketch plugin to align your layers to a key layer. 4 | 5 | ![preview of A Lion in Sketch](https://github.com/KevinGutowski/A-Lion/blob/master/preview_images/preview1.png?raw=true) 6 | 7 | ### Installation 8 | Download the contents of this repository, then double-click the `AlignTo.sketchplugin` bundle. 9 | 10 | ### How to use 11 | 12 | 1. Select some layers 13 | 2. Run the plugin by going to `Plugins > 🦁 A Lion Layers` 14 | 3. Specify which layer you want to be the key layer by selecting it from the list of layers 15 | 4. Select the alignment type that you want to apply 16 | 5. Click Align to apply the alignment modification 17 | 18 | ### Tips 19 | 1. You can use the arrow keys on your keyboard to quickly change the selected layer (Up/Down arrows) and the alignment type (Left/Right arrows) 20 | 2. If you just select two layers and you want to quickly invert the key object, hold down control when selecting an alignment type. If you select more than two layers the plugin window will be shown allowing you to specify a key layer. 21 | 22 | ![image](https://github.com/KevinGutowski/A-Lion/blob/master/preview_images/preview2.gif?raw=true) 23 | 24 | ### Credits 25 | 26 | Huge thanks to Aby ([@abynim](https://twitter.com/abynim)) for his help with this plugin. 🙌 27 | 28 | Icon is by [Matt Skiles](https://twitter.com/matthewskiles). The lion is so good!! 29 | 30 | ### Other plugins 31 | 32 | - [🐈 Truncat...](https://github.com/KevinGutowski/Truncat) 33 | - Easily add text truncation to text objects and symbols 34 | - [🐉 ToggleGreyscale](https://github.com/KevinGutowski/ToggleGreyscale) 35 | - Easily preview your mocks in greyscale 36 | - [📌 BetterTypePanel](https://github.com/KevinGutowski/betterTypePanel) 37 | - A quick-access window to control OpenType properties 38 | - [🎭 Mask Selection](https://github.com/KevinGutowski/Mask-Selection) 39 | - Make a mask around your selection with one click 40 | - [🔎 Find Dirty Styles](https://github.com/KevinGutowski/FindDirtyStyles) 41 | - Find those pesky styles that are out of sync! 42 | --------------------------------------------------------------------------------