Replacement for xdg-open that uses Syndicate for messaging (Embrace, Extend, Extinguish).
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Emery Hemingway 73e63bdc77 Rewrite for Syndicate-nim changes 3 weeks ago
src Rewrite for Syndicate-nim changes 3 weeks ago
.envrc Add Direnv metadata 3 weeks ago
.gitignore Add Direnv metadata 3 weeks ago
README.md Rewrite for Syndicate-nim changes 3 weeks ago
Tuprules.tup Update build metadata 2 months ago
handlers-example.pr Rewrite for Syndicate-nim changes 3 weeks ago
protocol.prs Rewrite for Syndicate-nim changes 3 weeks ago
uri_runner.pr Rewrite for Syndicate-nim changes 3 weeks ago
xdg_open_ng.nimble Rewrite for Syndicate-nim changes 3 weeks ago

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 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.

Matching patterns to actions is done with action-handler records:

<action-handler "foo://(.*):(.*)" $entity <krempel ["--host=$1" "--port=$2"]> >

In the preceding example the URI foo://bar:42 would cause the message <krempel ["--host=bar" "--port=42"]> to be sent to $entity.

See handlers-example.pr for more information.

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