aboutsummaryrefslogtreecommitdiff
path: root/content/notes/2023-06-25-alacritty-open-links-with-modifier.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/notes/2023-06-25-alacritty-open-links-with-modifier.md')
-rw-r--r--content/notes/2023-06-25-alacritty-open-links-with-modifier.md35
1 files changed, 0 insertions, 35 deletions
diff --git a/content/notes/2023-06-25-alacritty-open-links-with-modifier.md b/content/notes/2023-06-25-alacritty-open-links-with-modifier.md
deleted file mode 100644
index eb73c4c..0000000
--- a/content/notes/2023-06-25-alacritty-open-links-with-modifier.md
+++ /dev/null
@@ -1,35 +0,0 @@
1---
2title: "Alacritty open links with modifier"
3url: alacritty-open-links-with-modifier.html
4date: 2023-06-25T17:17:16+02:00
5type: note
6draft: false
7tags: [linux]
8---
9
10Alacritty by default makes all links in the terminal output clickable and this
11gets annoying rather quickly. I liked the default behavior of Gnome terminal
12where you needed to hold Control key and then you could click and open links.
13
14To achieve this in Alacritty you need to provide a `hint` in the configuration
15file. Config file is located at `~/.config/alacritty/alacritty.yml`.
16
17```yaml
18hints:
19 enabled:
20 - regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
21 [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
22 command: xdg-open
23 post_processing: true
24 mouse:
25 enabled: true
26 mods: Control
27```
28
29The following should work under any Linux system. For macOS, you will need to
30change `command: xdg-open` to something else.
31
32Now the links will be visible and clickable only when Control key is being
33pressed.
34
35Source: https://github.com/alacritty/alacritty/issues/5246