aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/weltschmerz.1
diff options
context:
space:
mode:
authorJuhani Krekelä2021-07-24 19:15:13 +0300
committerWolfgang Müller2021-11-27 14:05:19 +0100
commita9706ec27edc0aef03f72daba28647aca1c42070 (patch)
treea6589cc410f91fb45e1093423fde9170de43e83f /weltschmerz.1
parent78e1e14fa676a6c995d9dc61ad038a9906f37bf7 (diff)
downloadweltschmerz-a9706ec27edc0aef03f72daba28647aca1c42070.tar.gz
Add ability to specify additional URI handlers
This commit adds a new section, open-with, to the configuration file. The options specified there will be added as "Open with …" menu items in the URI context menu. This is to make it easier to perform other actions on the URI than opening it in the system default browser; a user might for example add another browser, media player, or a script that preprocesses the URI before opening it.
Diffstat (limited to 'weltschmerz.1')
-rw-r--r--weltschmerz.120
1 files changed, 19 insertions, 1 deletions
diff --git a/weltschmerz.1 b/weltschmerz.1
index 77a67df..6b64184 100644
--- a/weltschmerz.1
+++ b/weltschmerz.1
@@ -1,4 +1,4 @@
-.Dd July 12, 2021
+.Dd July 24, 2021
.Dt WELTSCHMERZ 1
.Os
.Sh NAME
@@ -88,6 +88,9 @@ font = Iosevka Light 16
[colours]
foreground = #000000
background = #ffffff
+
+[open-with]
+mpv = mpv %
.Ed
.Pp
Refer to the GLib documentation for detailed information on this format.
@@ -254,6 +257,21 @@ selection.background/reverse video
bold/inherit colour
.TE
.Ed
+.Pp
+The options in the
+.Em open-with
+section define programs that can be invoked from the URI context menu.
+The option name determines the name of the program as displayed in the
+menu, and the value the command to be executed.
+.Pp
+.Nm
+handles quotes in the command following POSIX
+.Xr sh 1
+rules,
+but does not do wildcard or variable expansion.
+Any
+.Dq %
+is replaced with the URI when executing the command.
.Sh FILES
.Bl -tag -width Ds
.It Em $XDG_CONFIG_HOME/weltschmerz/config