diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-10-22 19:39:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-22 19:39:26 +0000 |
commit | 8ee0d2b5b26faacb5f2663bae1fc056ac5ee26bf (patch) | |
tree | 093022ebdb474b891c8946ae42972dc23f73fefe /alacritty_macos.yml | |
parent | 4380d0864b1098909bdcfec132b866c34924517e (diff) |
Add option to open URLs on click
This adds the option to automatically launch URLs with a specified
program when clicking on them.
The config option `mouse.url_launcher` has been added to specify which
program should be used to open the URL. The URL is always passed as the
last parameter to the specified command.
It is not always desired for URLs to open automatically when clicking on
them. To resolve this a new `modifiers` field has been introduced to the
config, which allows specifying which keyboard modifiers need to be held
down to launch URLs in the specified launcher.
Some tests have been added to make sure that the edge-cases of the URL
parsing are protected against future regressions. To make testing easier
the parsing method has been moved into the `SemanticSearch` trait. The
name of the trait has also been changed to just `Search` and it has been
moved to `src/term/mod.rs` to fit the additional functionality.
This fixes #113.
Diffstat (limited to 'alacritty_macos.yml')
-rw-r--r-- | alacritty_macos.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/alacritty_macos.yml b/alacritty_macos.yml index b9abc58e..9d1fa378 100644 --- a/alacritty_macos.yml +++ b/alacritty_macos.yml @@ -260,6 +260,19 @@ mouse: double_click: { threshold: 300 } triple_click: { threshold: 300 } + url: + # URL launcher + # + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + launcher: open + + # URL modifiers + # + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + #modifiers: Control|Shift + selection: semantic_escape_chars: ",│`|:\"' ()[]{}<>" |