Skip to content

Commit

Permalink
Remove need for manual setup step
Browse files Browse the repository at this point in the history
Instead of needing to run `.setup-better-dictionaries`,
now we run `./setup.sh` before each dict import.
  • Loading branch information
mr-pennyworth committed Jun 26, 2024
1 parent c6bc1eb commit 2258ddb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 96 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ Better search and live previews for built-in macOS dictionaries.
- Import any compatible dictionary


### Setup
After importing the workflow, type `.setup-better-dictionaries` into Alfred.


### Importing a Dictionary
After setup, type `.dict-import` into Alfred.
After importing the workflow, type `.dict-import` into Alfred.
![](images/import-any.png)
Select the dictionary you want to import.

Expand Down
98 changes: 7 additions & 91 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@
<false/>
</dict>
</array>
<key>1F752B51-8F34-42C7-B6EE-3DBFE003C773</key>
<array>
<dict>
<key>destinationuid</key>
<string>96B75A90-A8B0-4B61-85E7-91F01F0835E3</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
<key>vitoclose</key>
<false/>
</dict>
</array>
<key>20D38440-F936-46C0-B86E-DBD7028AFDB7</key>
<array>
<dict>
Expand Down Expand Up @@ -507,6 +494,7 @@ fi</string>
<key>script</key>
<string>query=$1
./setup.sh
mkdir -p "$alfred_workflow_data"
./python pyapp/BetterDict.py import "$query" "$alfred_workflow_data"</string>
<key>scriptargtype</key>
Expand Down Expand Up @@ -594,66 +582,6 @@ mkdir -p "$alfred_workflow_data"
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>#!/bin/bash
chmod +x ./jq
chmod +x ./alfred-dict-server
xattr -d com.apple.quarantine ./AlfredExtraPane.app
xattr -d com.apple.quarantine ./jq
xattr -d com.apple.quarantine ./alfred-dict-server
open ./AlfredExtraPane.app
open "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"
osascript &lt;&lt;END
tell application "System Preferences"
activate
end tell
END</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string>setup.sh</string>
<key>type</key>
<integer>8</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>96B75A90-A8B0-4B61-85E7-91F01F0835E3</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>2</integer>
<key>keyword</key>
<string>.setup-better-dictionaries</string>
<key>subtext</key>
<string>.setup-better-dictionaries</string>
<key>text</key>
<string>Setup Better Dictionaries</string>
<key>withspace</key>
<false/>
</dict>
<key>type</key>
<string>alfred.workflow.input.keyword</string>
<key>uid</key>
<string>1F752B51-8F34-42C7-B6EE-3DBFE003C773</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -784,12 +712,7 @@ EOF</string>
</dict>
</array>
<key>readme</key>
<string>### Setup:
After importing, first type `.setup-better-dictionaries`
into alfred (without the quotes)
### Note:
<string>### Note:
After each mac restart, for the first time when you run
the workflow, expect a comparatively slower search.
Subsequent searches should be snappy
Expand Down Expand Up @@ -833,19 +756,12 @@ Subsequent searches should be snappy
<key>ypos</key>
<real>15</real>
</dict>
<key>1F752B51-8F34-42C7-B6EE-3DBFE003C773</key>
<dict>
<key>xpos</key>
<real>30</real>
<key>ypos</key>
<real>500</real>
</dict>
<key>20D38440-F936-46C0-B86E-DBD7028AFDB7</key>
<dict>
<key>xpos</key>
<real>30</real>
<key>ypos</key>
<real>720</real>
<real>610</real>
</dict>
<key>29F7F338-2B96-43C0-A429-19810757504C</key>
<dict>
Expand Down Expand Up @@ -882,7 +798,7 @@ Subsequent searches should be snappy
<key>xpos</key>
<real>30</real>
<key>ypos</key>
<real>610</real>
<real>500</real>
</dict>
<key>6E224CAA-82D7-45F9-9037-58E8D3C2F854</key>
<dict>
Expand All @@ -907,7 +823,7 @@ Subsequent searches should be snappy
<key>xpos</key>
<real>185</real>
<key>ypos</key>
<real>720</real>
<real>610</real>
</dict>
<key>96B75A90-A8B0-4B61-85E7-91F01F0835E3</key>
<dict>
Expand Down Expand Up @@ -946,7 +862,7 @@ Subsequent searches should be snappy
<key>xpos</key>
<real>185</real>
<key>ypos</key>
<real>610</real>
<real>500</real>
</dict>
<key>EAFA3DE4-7416-4CD3-94A2-91E6A70F554B</key>
<dict>
Expand Down Expand Up @@ -974,7 +890,7 @@ Subsequent searches should be snappy
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>0.2.13</string>
<string>0.2.14</string>
<key>webaddress</key>
<string>https://github.com/mr-pennyworth/alfred-better-dictionaries</string>
</dict>
Expand Down

0 comments on commit 2258ddb

Please sign in to comment.