From ea152e1c4228479ae85a7a8f4f7d9fe472691290 Mon Sep 17 00:00:00 2001 From: mediocregopher Date: Sat, 6 Jan 2024 13:29:11 +0100 Subject: Fix alacritty not opening links when clicked --- alacritty/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/alacritty/default.nix b/alacritty/default.nix index d0c08aa..0a84229 100644 --- a/alacritty/default.nix +++ b/alacritty/default.nix @@ -17,13 +17,19 @@ xdgOpenRules = defaultXDGOpenRules ++ config.alacritty.xdgOpenRules; + alacrittyUnwrap = pkgs.writeShellScript "alacritty-unwrap" '' + unset LD_LIBRARY_PATH + unset __EGL_VENDOR_LIBRARY_DIRS + exec "$@" + ''; + hints = { enabled = (builtins.map (r: { regex = r.pattern; hyperlinks = true; command = (pkgs.writeShellScript "alacritty-hints-${r.name}" '' - xdg-open "${r.xdgOpen}" + ${alacrittyUnwrap} xdg-open "${r.xdgOpen}" ''); post_processing = true; mouse.enabled = true; @@ -39,9 +45,7 @@ ); shellEntrypoint = pkgs.writeShellScript "alacritty-shell-entrypoint" '' - unset LD_LIBRARY_PATH - unset __EGL_VENDOR_LIBRARY_DIRS - exec "${zsh}/bin/zsh" "$@" + exec ${alacrittyUnwrap} "${zsh}/bin/zsh" "$@" ''; alacritty = pkgs.writeShellScriptBin "alacritty" '' -- cgit v1.2.3