From 2a4b3bbb796379df13ec3f957a99d7636f9acf5a Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Mon, 24 Jun 2024 01:01:38 -0400 Subject: [PATCH] Alacritty: StartupNotify workaround --- modules/desktop/alacritty.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/desktop/alacritty.nix b/modules/desktop/alacritty.nix index 38da013..a4abdf0 100644 --- a/modules/desktop/alacritty.nix +++ b/modules/desktop/alacritty.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: let config = (pkgs.formats.toml { }).generate "alacritty.toml" @@ -21,8 +21,18 @@ let import = [ "${pkgs.alacritty-theme}/tango_dark.toml" ]; }; + # Alacritty seems to not communicate well with gnome-shell. Quick fix: + notify-fix = pkgs.runCommand "alacritty-fix" { } '' + dt=share/applications/Alacritty.desktop + install -D ${pkgs.alacritty}/$dt $out/$dt + sed -i 's/^StartupNotify=.*//' $out/$dt + ''; + in { environment.etc."xdg/alacritty.toml".source = config; - environment.systemPackages = [ pkgs.alacritty ]; + environment.systemPackages = [ + (lib.hiPrio notify-fix) + pkgs.alacritty + ]; }