Skip to content

Instantly share code, notes, and snippets.

@perifer
Created December 17, 2009 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perifer/258712 to your computer and use it in GitHub Desktop.
Save perifer/258712 to your computer and use it in GitHub Desktop.
> Lines beginning with `>` are comments.
> Comments and empty lines are ignored.
>
> Each command is defined on a single line comprised of:
>
> 1. a case-insensitive, alpha-numeric trigger followed
> by whitespace
> 2. a url followed by whitespace (if the url contains
> spaces they must be encoded as `%20`)
> 3. a short description
>
> Urls may contain the following replacement tokens:
>
> 1. `%s` is replaced by any search terms that were
> provided when a command is triggered.
> 2. `%r` is replaced by the url of the page you were on
> when Shortwave was invoked, eg. the `tr` trigger.
> 3. `%d` is replaced by just the domain of the url you were
> on when Shortwave was invoked, eg. the `gs` trigger.
> 4. `%t` is replaced by the page title of the url you were
> on when Shortwave was invoked, eg. the `e` trigger.
>
> A special `*` trigger can be used to define an untriggered
> search. For instance, adding the following:
>
> * http://www.google.com/search?q=%s Untriggered search
>
> to your custom command file would allow you to do a Google
> Search by entering just a search term (without the `g` trigger)
> in the Shortwave prompt.
>
> The following default triggers do not need to be redefined
> in your custom command file but they may be overridden. They
> can be eliminated entirely by adding the following to the
> top of your custom command file:
>
> > #kill-defaults
>
> Enjoy!
g http://www.google.com/search?q=%s Google Search
gs http://www.google.com/search?q=site:%d%20%s Search the current site
map http://www.google.com/maps?q=%s Google Maps
img http://www.google.com/images?q=%s Google Image Search
tr http://translate.google.com/translate?u=%r&tl=%s Translate the current page
d http://www.google.com/search?q=define:%s Google Define a word
> d http://freedictionary.org/?Query=%s Free Dictionary
w http://wikipedia.org/wiki/Special:Search/%s Wikipedia Search
php http://php.net/search.php?show=quickref&pattern=%s PHP Function Search
a http://amazon.com/s/?url=search-alias%3Daps&field-keywords=%s Amazon Search
imdb http://www.imdb.com/find?s=all&q=%s IMDB Search
nf http://www.netflix.com/Search?v1=%s Netflix Search
f http://flickr.com/search/?q=%s Flickr Search
t http://twitter.com/%s Twitter User
s http://search.twitter.com/search?q=%s Twitter Search (was Summize)
yt http://www.youtube.com/results.php?search_query=%s YouTube Search
v http://vimeo.com/videos/search:%s Vimeo Search
ip http://www.whatismyip.org/ IP Address
whois http://www.whois-search.com/whois/%s whois Search
e mailto:?subject=%t&body=%s%0A%0A%09%r%0A%0A Email link
dp http://drupal.org/project/%s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment