Start ghostty in maximized window state

This commit is contained in:
Yan Lin 2025-09-13 15:42:02 +02:00
parent 1c00ca8c64
commit 75f16ab43d
3 changed files with 8 additions and 3 deletions

View file

@ -32,6 +32,7 @@
programs.ghostty-custom = { programs.ghostty-custom = {
enable = true; enable = true;
package = null; # Use Homebrew-installed Ghostty on Darwin package = null; # Use Homebrew-installed Ghostty on Darwin
windowMode = "maximized";
}; };
home.username = "yanlin"; home.username = "yanlin";

View file

@ -25,7 +25,7 @@
enable = true; enable = true;
package = pkgs.ghostty; # Install via nix on NixOS package = pkgs.ghostty; # Install via nix on NixOS
fontSize = 11; fontSize = 11;
windowMode = "fullscreen"; windowMode = "maximized";
}; };
# Any ThinkPad-specific home configurations can be added here # Any ThinkPad-specific home configurations can be added here

View file

@ -24,9 +24,9 @@ in
}; };
windowMode = mkOption { windowMode = mkOption {
type = types.enum [ "windowed" "fullscreen" ]; type = types.enum [ "windowed" "maximized" "fullscreen" ];
default = "windowed"; default = "windowed";
description = "Window mode: 'windowed' for fixed size window or 'fullscreen' for full screen"; description = "Window mode: 'windowed' for fixed size, 'maximized' for maximized window, or 'fullscreen' for full screen";
}; };
windowWidth = mkOption { windowWidth = mkOption {
@ -103,6 +103,10 @@ in
window-height = cfg.windowHeight; window-height = cfg.windowHeight;
}) })
(mkIf (cfg.windowMode == "maximized") {
maximize = true;
})
(mkIf (cfg.windowMode == "fullscreen") { (mkIf (cfg.windowMode == "fullscreen") {
fullscreen = true; fullscreen = true;
}) })