├── README.md └── URLs.textexpander /README.md: -------------------------------------------------------------------------------- 1 | This is a TextExpander library of snippets I use to get URLs from (mostly) Safari and insert them where I'm typing. The idea is to avoid switching back and forth between apps and cluttering up the clipboard. 2 | 3 | Each of the abbreviations is prefixed with "jj," because that's how I structure my snippets. It's easy to go in an change that after you've imported the snippets into TextExpander. 4 | 5 | # furl # 6 | Gets the URL of the page showing in the frontmost tab of Safari. 7 | 8 | # 1url–6url # 9 | Gets the the URL of the nth tab from the left in Safari. 10 | 11 | # turl # 12 | Gets the URL of the currently selected item in Transmit. 13 | 14 | # ip # 15 | Gets your current public-facing IP number from dyndns.org 16 | -------------------------------------------------------------------------------- /URLs.textexpander: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | groupInfo 6 | 7 | expandAfterMode 8 | 2 9 | groupName 10 | URLs 11 | 12 | snippetsTE2 13 | 14 | 15 | abbreviation 16 | jjip 17 | abbreviationMode 18 | 0 19 | creationDate 20 | 2011-09-03T02:45:57Z 21 | label 22 | Current external IP number 23 | modificationDate 24 | 2011-09-03T02:54:12Z 25 | plainText 26 | #!/bin/bash 27 | echo -n `curl -s http://checkip.dyndns.org/ | grep -Eo '[0-9.]+'` 28 | snippetType 29 | 3 30 | uuidString 31 | F66A82A7-9470-4856-BF78-A304EA429B6A 32 | 33 | 34 | abbreviation 35 | jj1url 36 | abbreviationMode 37 | 0 38 | creationDate 39 | 2009-07-29T13:05:19Z 40 | label 41 | Tab 1 URL 42 | modificationDate 43 | 2015-07-10T15:38:57Z 44 | plainText 45 | set tabNum to 1 46 | tell application "Safari" to get URL of tab tabNum of front window 47 | 48 | snippetType 49 | 2 50 | uuidString 51 | 55690A85-5FA2-4285-B41A-9710899139D7 52 | 53 | 54 | abbreviation 55 | jj2url 56 | abbreviationMode 57 | 0 58 | creationDate 59 | 2009-07-29T13:06:16Z 60 | label 61 | Tab 2 URL 62 | modificationDate 63 | 2015-07-10T15:39:19Z 64 | plainText 65 | set tabNum to 2 66 | tell application "Safari" to get URL of tab tabNum of front window 67 | 68 | snippetType 69 | 2 70 | uuidString 71 | 764672EC-8CDC-4C5B-BEAA-3ABA83AF135F 72 | 73 | 74 | abbreviation 75 | jj3url 76 | abbreviationMode 77 | 0 78 | creationDate 79 | 2009-07-29T13:06:34Z 80 | label 81 | Tab 3 URL 82 | modificationDate 83 | 2015-07-10T15:39:26Z 84 | plainText 85 | set tabNum to 3 86 | tell application "Safari" to get URL of tab tabNum of front window 87 | 88 | snippetType 89 | 2 90 | uuidString 91 | EF1A73F8-E1A7-4A04-B759-06DCA1B7440A 92 | 93 | 94 | abbreviation 95 | jj4url 96 | abbreviationMode 97 | 0 98 | creationDate 99 | 2009-07-29T13:07:17Z 100 | label 101 | Tab 4 URL 102 | modificationDate 103 | 2015-07-10T15:39:33Z 104 | plainText 105 | set tabNum to 4 106 | tell application "Safari" to get URL of tab tabNum of front window 107 | 108 | snippetType 109 | 2 110 | uuidString 111 | BC519629-5A5D-4CD0-8AED-E7621FF2C68F 112 | 113 | 114 | abbreviation 115 | jj5url 116 | abbreviationMode 117 | 0 118 | creationDate 119 | 2009-07-29T13:07:42Z 120 | label 121 | Tab 5 URL 122 | modificationDate 123 | 2015-07-10T15:39:41Z 124 | plainText 125 | set tabNum to 5 126 | tell application "Safari" to get URL of tab tabNum of front window 127 | 128 | snippetType 129 | 2 130 | uuidString 131 | 8E48C7A8-CC81-44CC-A2C3-E9FE624B7BDD 132 | 133 | 134 | abbreviation 135 | jj6url 136 | abbreviationMode 137 | 0 138 | creationDate 139 | 2009-07-29T13:08:01Z 140 | label 141 | Tab 6 URL 142 | modificationDate 143 | 2015-07-10T15:39:49Z 144 | plainText 145 | set tabNum to 6 146 | tell application "Safari" to get URL of tab tabNum of front window 147 | 148 | snippetType 149 | 2 150 | uuidString 151 | DFA22F26-82CA-4BD9-AA51-2ED7C7085105 152 | 153 | 154 | abbreviation 155 | jjfurl 156 | abbreviationMode 157 | 0 158 | creationDate 159 | 2010-01-18T16:58:59Z 160 | label 161 | Front URL 162 | modificationDate 163 | 2015-07-10T15:42:07Z 164 | plainText 165 | tell application "Safari" to get URL of front document 166 | 167 | snippetType 168 | 2 169 | uuidString 170 | A6FDF5EF-A293-410E-A847-08B778E2900D 171 | 172 | 173 | abbreviation 174 | jjturl 175 | abbreviationMode 176 | 0 177 | creationDate 178 | 2015-09-07T15:30:03Z 179 | label 180 | Transmit URL 181 | modificationDate 182 | 2015-09-08T21:26:03Z 183 | plainText 184 | transmit = Application('Transmit').documents[0].currentTab.remoteBrowser 185 | imgPath = transmit.rootPath().slice(25) 186 | fileName = transmit.selectedBrowserItems[0].name() 187 | 'http://leancrew.com' + imgPath + '/' + encodeURI(fileName) 188 | 189 | snippetType 190 | 4 191 | uuidString 192 | EC4D37B1-3214-4544-967F-47F9418C25FA 193 | 194 | 195 | 196 | 197 | --------------------------------------------------------------------------------