Skip to content

Instantly share code, notes, and snippets.

@claui
Created October 2, 2021 21:04
Show Gist options
  • Save claui/ea4bf0d593a2df9c0e15b0467918645c to your computer and use it in GitHub Desktop.
Save claui/ea4bf0d593a2df9c0e15b0467918645c to your computer and use it in GitHub Desktop.
OpenSearch descriptor for the Arch User Repository (AUR)
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>AUR</ShortName>
<LongName>Arch User Repository</LongName>
<Description/>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16" type="image/x-icon">https://www.archlinux.org/static/favicon.29302f683ff8.ico</Image>
<Image height="64" width="64" type="image/png">https://www.archlinux.org/static/logos/icon-transparent-64x64.9ed71ce9197d.png</Image>
<Url type="text/html" template="https://aur.archlinux.org/packages/">
<Param name="O" value="0"/>
<Param name="K" value="{searchTerms}"/>
</Url>
<!--
Suggestions don’t work as of 2019-05-31;
the expected response (["pac", ["pacfoo", "pacbar"]])
does not match the actual response (["pacfoo", "pacbar"])
-->
<!--
<Url rel="suggestions" type="application/x-suggestions+json"
template="https://aur.archlinux.org/rpc/">
<Param name="v" value="5"/>
<Param name="type" value="suggest"/>
<Param name="arg" value="{searchTerms}"/>
</Url>
-->
</OpenSearchDescription>
@claui
Copy link
Author

claui commented Oct 2, 2021

To add this search extension to Firefox:

  1. Navigate to about:config.
  2. Set the devtools.chrome.enabled preference to true.
  3. Open Browser Console.
    Caution: that’s not the Developer Tools console. It’s something entirely different.
  4. Paste the following code snippet into the Browser Console:
await Services.search.addOpenSearchEngine(
  'https://gist.githubusercontent.com/claui/ea4bf0d593a2df9c0e15b0467918645c'
    + '/raw/f6c9fc6323c5cc01821be72e73f2177fc5d08a35/opensearch-aur.xml',
  null
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment