diff options
author | Juhani Krekelä | 2021-07-24 19:15:13 +0300 |
---|---|---|
committer | Wolfgang Müller | 2021-11-27 14:05:19 +0100 |
commit | a9706ec27edc0aef03f72daba28647aca1c42070 (patch) | |
tree | a6589cc410f91fb45e1093423fde9170de43e83f /config.vala | |
parent | 78e1e14fa676a6c995d9dc61ad038a9906f37bf7 (diff) | |
download | weltschmerz-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 '')
-rw-r--r-- | config.vala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config.vala b/config.vala index 0234aac..c0a084f 100644 --- a/config.vala +++ b/config.vala @@ -1,3 +1,8 @@ +struct OpenWithProgram { + string name; + string[] command; +} + class Config { public bool autohide_mouse; @@ -18,6 +23,8 @@ class Config { public Gdk.RGBA[] palette = new Gdk.RGBA[16]; + public OpenWithProgram[] open_with_programs; + struct PaletteEntry { string name; string normal; @@ -65,6 +72,8 @@ class Config { palette[i + 8] = reader.read_colour("colours", "bright." + entry.name, entry.bright); } + open_with_programs = reader.read_open_with({}); + reader.log_unknown_keys(); } |