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