2019-08-01 (v0.19-beta)
- Add entitlements for accessing contacts. This re-enables the All Contacts data source (or anything else that searches your contacts).
$find
or $clipboard
in a format string would not always update when the clipboard was changed. For example if an item had ${query:-${find}}
as its argument and was executed without entering any query string, but new content on the find clipboard, the expanded value from last time this item was executed, would be used.Genie now includes the default set of items. Any changes you make to items are saved as ~/Library/Application Support/Genie/Custom.genieItems
(saving only the changes).
If there is no Custom.genieItems
then Genie will still load the old Items.plist
, this is incase you have changes that you wish to keep. If this is the case, do the following to make sure Custom.genieItems
becomes a delta against the latest version if Items.plist
:
Custom.genieItems
~/Library/Application Support/Genie
Custom.genieItems
~/Library/Application Support/Genie
except Custom.genieItems
and possibly ClipboardHistory.db
If you do not have customizations (that you wish to keep), just do:
~/Library/Application Support/Genie
Fixed issue with stale results from script data source that had no expiration or dependency (these should expire when closing the window, but did not).
Fixed exception if using malformed predicate strings for Spotlight Query or Predicate Group items.
I forgot to include changes in the last release: Major change is that there is now documentation (in the Preferences window), which you may have noticed. In the documentation you can read about how JavaScript can now run shell commands (new in last build). This is currently used by Set Timer where it is now possible to click a timer to cancel it.
Also added in last build are CSS variables for textColor
, labelColor
, secondaryLabelColor
, tertiaryLabelColor
, and quaternaryLabelColor
. These should be used instead of hardcoded colors in anticipation of darkmode support. The Show Calendar makes use of these (and now includes week numbers).
Improved preferences window, you can now:
defaults write com.macromates.Genie clipboardHistoryExpireAfter «value»
where «value»
should be a number followed by hours
, days
, months
, or years
, e.g. 12 hours
.There are still some minor quirks to work out. For example recording a new shortcut key may bring up Genie if you pick the same key and checking for updates will bring up a non-focused dialog. Both issues are because Genie and the preferences window are separate applications.
The Dry Run feature in preferences (⌘R) now show console output and potential error.
You can now bind parameters to sqlite3 queries. Use ?
in the query itself and then provide the value via the “Bindings” table below the query.
Items with (inline) HTML output can now access the query string as genie.query
(from JavaScript) and a querychange
event is fired when the query string is changed (though the event target is currently window
). It is also possible to write to the genie.query
property, although currently the filter string (shown to the user) is not updated (but may be in the future). The “Show Calendar” item has been updated to make use of this, so it is pure HTML/JavaScript. There may still be some flashing when the filter string changes, this is due to how view-based table views do not always re-use same views for same rows when content changes, so a new WKWebView
is created. It should however be possible to address.
Items can now set acceptsQuery = :true;
(using the “Advanced…” button). Normally Genie detects this automatically by looking if the title, script arguments, etc. reference the ${query}
variable, but items with inline HTML can access this via JavaScript, which Genie won’t (currently) detect.
This version is a major refactoring/rewrite: Be sure to update Application Support/Genie
from GitHub.
You can use ⌃↑ or ⌃↓ to scroll through filter string history. This is mainly if you do some complex calculation, close Genie, and wants to get back to the calculation and augment it.
There is a spinner to show when data sources are active. Currently it shows immediately, so it may cause a bit of flicker for short-lived data sources. I have kept it like this for debugging/diagnostics (being sure something is running or not running). Eventually it’ll be made to start after a short delay.
The Show Calendar item has arrows to go to previous/next month.
Performance for Dry Run in Genie Preferences should be much better, although currently there is no console output for script data sources.
Alternate actions are currently not supported (these appeared when holding down option), I plan to bring them back but in a slightly different form, as I want this to work with predicate groups.
Variables are no longer recursively expanded. E.g. before you could set an item’s title to ${foo}
then set the variable foo
to ${bar}
etc. and Genie would follow it until it reached a literal value (or detected a loop). There are two reasons I changed this:
${file}
then the path will be abbreviated with a tilde (when appropriate), etc. When supporting recursive expansion, these transformations became a little opaque, because some you’d want inherited, others not.${query}
) when doing a dry run, and variables are not expanded, e.g. a database path using $HOME
will fail when executed from the preferences window.Selecting multiple items and pressing return will now look at the item’s type and arguments:
Non-script items are executed one-by-one, e.g. selecting multiple URLs and pressing ↩ will open them all.
For items using the same script with identical arguments, only the first item is executed, but the other items are available (as JSON) via STDIN. An example of this is iTunes → All Artists where the user can select multiple songs, and only one instance of the script is executed, which creates a playlist using all selected items (read from STDIN).
Script items with different arguments (but possibly same script) will be executed one-by-one, an example of this would be «Application» → Recent Documents. Here each document item uses the same script (/usr/bin/open -b "$0" "$1"
) but the second argument (the file to open) is different for each item, therefor Genie will run /usr/bin/open
for each selected document.
Changed the main UI: This is still work in progress, as we may need a more customized text field plus a visual effects view to get blurred background, custom drawn icons instead of the non-scalable gear and magnifying glass, etc.