From 1f824f9250f1a10c6368828646d256a4bbc93498 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Mon, 13 Jan 2025 18:32:42 +0300 Subject: [PATCH] Quit Ghostty with Command-Q if on Darwin --- modules/common/ghostty.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/common/ghostty.nix b/modules/common/ghostty.nix index b472be4..e853801 100644 --- a/modules/common/ghostty.nix +++ b/modules/common/ghostty.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: let - inherit (lib) enabled mapAttrsToList merge mkIf; + inherit (lib) enabled mapAttrsToList merge mkIf optionals; in merge <| mkIf config.isDesktop { home-manager.sharedModules = [{ programs.nushell.environmentVariables = { @@ -71,7 +71,9 @@ in merge <| mkIf config.isDesktop { } ++ mapAttrsToList (name: value: "ctrl+${name}=${value}") { "physical:tab" = "next_tab"; "shift+physical:tab" = "previous_tab"; - }; + } ++ optionals config.isDarwin [ + "command+q=quit" + ]; }; }; }];