summaryrefslogtreecommitdiffstats
path: root/alacritty.yml
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-10-22 19:39:26 +0000
committerGitHub <noreply@github.com>2018-10-22 19:39:26 +0000
commit8ee0d2b5b26faacb5f2663bae1fc056ac5ee26bf (patch)
tree093022ebdb474b891c8946ae42972dc23f73fefe /alacritty.yml
parent4380d0864b1098909bdcfec132b866c34924517e (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.yml')
-rw-r--r--alacritty.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/alacritty.yml b/alacritty.yml
index 63bb7a4b..adfad388 100644
--- a/alacritty.yml
+++ b/alacritty.yml
@@ -261,6 +261,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: xdg-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: ",│`|:\"' ()[]{}<>"