Alacritty open links with modifier

note, Jun 25, 2023, on Mitja Felicijan's blog

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.

Source: https://github.com/alacritty/alacritty/issues/5246

Other notes

DateTitle
Make DCSS playable on 4k displaysdcss
Sending signals to C programsc
Extending dte editor
Uninstall Ollama from a Linux box
Sane defaults for tmux with more visible statusbar
Compile drawterm on Fedora 38plan9
Download list of YouTube files
Use option key as meta in Alacritty under macOS
Using ffmpeg to combine videos side by side
Bulk thumbnails
Dungeon Crawl Stone Soup - New player guidedcss
Currated list of Vim ALE linters
Personal sane Vim defaultsvim
Add lazy loading of images in Jekyll posts
Convert all MKV files into other formats