summaryrefslogtreecommitdiff
path: root/src/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'src/plumbing')
-rw-r--r--src/plumbing23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plumbing b/src/plumbing
new file mode 100644
index 00000000..74c1f306
--- /dev/null
+++ b/src/plumbing
@@ -0,0 +1,23 @@
+# pardes's plumbing rules, in plumb(6)'s language: a plumbing file of
+# your own names this one as `include basic`. A message (plumb/send) is
+# matched against the rule sets in order; the first whose patterns all
+# hold takes it, and its actions say where it goes: a port pardes reads
+# itself (edit: a file or directory opened as Look opens one; web: the
+# host's browser; a loaded kind by its name, `image`, `pdf`), another
+# port a program reads, or a word or command started.
+
+# urls go to the web browser (the host's: xdg-open, open on macOS)
+type is text
+data matches 'https?://.*'
+plumb to web
+
+# existing directories, and existing files at the place written after
+# them, go to the editor; a file a kind shows (a picture, a PDF) to
+# that kind
+type is text
+arg isdir $data
+plumb to edit
+
+type is text
+arg isfile $data
+plumb to edit