Implementation of the "open" command that uses Syndicate and PCRE pattern matching to open URIs.
Go to file
Emery Hemingway 2ab8dd5fb9 Add examples to README 2022-05-26 17:18:59 -05:00
src Start handlers at the Syndicate server 2022-05-19 12:05:57 -05:00
.gitignore Initial commit 2022-03-17 14:30:41 -05:00
README.md Add examples to README 2022-05-26 17:18:59 -05:00
exec.prs Start handlers at the Syndicate server 2022-05-19 12:05:57 -05:00
protocol.prs New protocol and configuration from Tony 2022-03-18 19:31:48 -05:00
uri_runner.pr Start handlers at the Syndicate server 2022-05-19 12:05:57 -05:00
xdg_open_ng.nimble Start handlers at the Syndicate server 2022-05-19 12:05:57 -05:00

README.md

xdg-open-ng

An xdg-open replacement that uses Syndicate and PCRE pattern matching to open URIs.

There are two utilites, xdg-open and uri_runner. The former connects to a shared Syndicate dataspace via a UNIX socket at $SYNDICATE_SOCK otherwise $XDG_RUNTIME_DIR/dataspace and as has no other configuration. The uri_runner component is intended to be managed by the Syndicate server thru which it receives configuration, see uri_runner.pr as an example.

The protocol.nim file is generated from the protocol.prs schema, a Tupfile file is provided to do this.

TODO

  • Fallback commands?

Examples

Type Rule
Bittorrent <action-handler "magnet:?.xt=urn:btih." ["transmission-remote-gtk" 0]>
Gemini <action-handler "gemini://.*
PDF <action-handler "file://(.*.pdf)" ["mupdf" 1]>
Tox <action-handler "tox:.*
Twatter <action-handler "https://twitter.com/(.*)" ["firefox" "--new-tab" "https://nitter.net/$1"]>
Video <action-handler ".*\.avi