diff --git a/flake.nix b/flake.nix index 6abaf1d..249757c 100755 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ tt-terminal, }@inputs: let - scheme = "gruvbox-dark"; + scheme = "catppuccin-mocha"; schemePath = inputs.nixpkgs.lib.strings.concatStrings [ "${inputs.tt-schemes}/base16/" "${scheme}" diff --git a/modules/maid/default.nix b/modules/maid/default.nix index eaf527c..d8c1de3 100644 --- a/modules/maid/default.nix +++ b/modules/maid/default.nix @@ -1,5 +1,6 @@ { imports = [ ./maid.nix + ./ghostty.nix ]; } diff --git a/modules/maid/ghostty.nix b/modules/maid/ghostty.nix index 9ca4af3..f9eb4b0 100644 --- a/modules/maid/ghostty.nix +++ b/modules/maid/ghostty.nix @@ -4,22 +4,31 @@ inputs, ... }: +let + ghosttyTheme = config.scheme { + templateRepo = inputs.tt-terminal; + target = "ghostty-base24"; + check-parsed-config-yaml = false; + }; +in { - file.xdg_config.ghostty = { - text = '' - quit-after-last-window-closed = false - theme = "tinted-theming" - font-family = "JetBrainsMono Nerd Font" - font-size = 14 - window-padding-x = 15 - window-padding-y = 15 - shell-integration = none - confirm-close-surface = false - ''; - target = "ghostty/config.ghostty"; + users.users.lucy.maid.file = { + xdg_config.ghostty = { + text = '' + quit-after-last-window-closed = false + theme = "tinted-theming" + font-family = "JetBrainsMono Nerd Font" + font-size = 14 + window-padding-x = 15 + window-padding-y = 15 + shell-integration = none + confirm-close-surface = false + ''; + target = "ghostty/config.ghostty"; + }; + xdg_config.ghostty_theme = { + text = builtins.readFile ghosttyTheme; + target = "ghostty/themes/tinted-theming"; + }; }; -# file.xdg_config.ghostty_theme = { -# text = "${builtins.readFile (config.scheme "${inputs.tt-terminal}/themes/ghostty/")}"; -# target = "ghostty/themes/tinted-theming"; -# }; } diff --git a/modules/maid/maid.nix b/modules/maid/maid.nix index fc8cb8f..dd3495b 100755 --- a/modules/maid/maid.nix +++ b/modules/maid/maid.nix @@ -8,7 +8,7 @@ { users.users.lucy.maid = { config, ... }: { imports = [ - ./ghostty.nix + ]; gsettings.settings = { org.gnome.desktop.interface = { @@ -28,8 +28,9 @@ ]; requires = [ "dbus.socket" ]; wantedBy = [ config.maid.systemdGraphicalTarget ]; + reloadIfChanged = true; serviceConfig = { - Type = "notify"; # reload waits for ghostty to sd_notify READY=1 + Type = "notify"; ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID"; BusName = "com.mitchellh.ghostty"; ExecStart = "${pkgs.ghostty}/bin/ghostty --gtk-single-instance=true --initial-window=false";