aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-06-25 17:26:26 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-06-25 17:26:26 +0200
commit1e7a6dc6e8a4aca1c9048e2b6ca2fbfa9c626103 (patch)
tree2f697cace0fcb02c0ba8569e9d19d49ab49255f4
parent821571ae4874189f83480d9bcfa7a045a9a2b267 (diff)
downloadmitjafelicijan.com-1e7a6dc6e8a4aca1c9048e2b6ca2fbfa9c626103.tar.gz
Note: Alacritty open links with modifier
-rw-r--r--content/notes/alacritty-open-links-with-modifier.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/content/notes/alacritty-open-links-with-modifier.md b/content/notes/alacritty-open-links-with-modifier.md
new file mode 100644
index 0000000..2ec1d59
--- /dev/null
+++ b/content/notes/alacritty-open-links-with-modifier.md
@@ -0,0 +1,35 @@
1---
2title: "Alacritty open links with modifier"
3url: alacritty-open-links-with-modifier.html
4date: 2023-06-25T17:17:16+02:00
5type: notes
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