Alacritty open links with modifier
Alacritty by default makes all links in the terminal output clickable and this gets annoying rather quickly. I liked the default behavior of Gnome terminal where you needed to hold Control key and then you could click and open links.
To achieve this in Alacritty you need to provide a hint
in the configuration
file. Config file is located at ~/.config/alacritty/alacritty.yml
.
hints:
enabled:
- regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
command: xdg-open
post_processing: true
mouse:
enabled: true
mods: Control
The following should work under any Linux system. For macOS, you will need to
change command: xdg-open
to something else.
Now the links will be visible and clickable only when Control key is being pressed.
Other notes
- Extract lines from a file with sed
- c Write and read structs to/from files in C
- vim Personal sane Vim defaults
- Set color temperature of displays on i3
- Use option key as meta in Alacritty under macOS
- plan9 Compile drawterm on Fedora 38
- plan9 Run 9front in Qemu
- c Extend Lua with custom C functions using Clang
- Easy measure time took in a bash script
- Change permissions of matching files recursively
- Edsger W. Dijkstra Manuscripts ebook
- Bulk thumbnails
- Cronjobs on Github with Github Actions
- Parse RSS feeds with Lua
- Execute not blocking async shell command in C#