add ghostty config

This commit is contained in:
DACHXY 2024-12-31 12:12:32 +08:00
parent 58f85834ff
commit d54c4da55e
7 changed files with 163 additions and 53 deletions

167
flake.lock generated
View file

@ -106,7 +106,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
@ -130,11 +130,11 @@
"zig": "zig" "zig": "zig"
}, },
"locked": { "locked": {
"lastModified": 1735270886, "lastModified": 1735597925,
"narHash": "sha256-J4RCJJu19cKIT1LCiQytUGcpcNHB7e9lcj+xiRKKYmU=", "narHash": "sha256-znyKiXlrkPL+2xQwAR6G4/DKCgsutyIPo+d1dGeh2W4=",
"owner": "ghostty-org", "owner": "ghostty-org",
"repo": "ghostty", "repo": "ghostty",
"rev": "b5f70b834bbf5350282cd13477ee98f9d85b5fb1", "rev": "478fe3917c2882a1c321f9d1eec808b71698974d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,11 +250,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734643652, "lastModified": 1735446832,
"narHash": "sha256-gnxQWeIitwduGalKZgO21B+7fJAnFRl2nlmPzzKoWno=", "narHash": "sha256-hem1Sr6bPEV4DFazWwbWcDlnfeCOGTHF5bE1/00lcCQ=",
"owner": "horriblename", "owner": "horriblename",
"repo": "hyprgrass", "repo": "hyprgrass",
"rev": "b2a1da139bbb4e12d67c9c1569a32ce54f5ebc6b", "rev": "8a66a38e25e0b777ff217af7c9044e6eec4fac10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -279,11 +279,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1735394862, "lastModified": 1735585949,
"narHash": "sha256-34vW0z18FAZajpAU2bFmGjiepnu+9Nm769blbbp679g=", "narHash": "sha256-vCGG4tGMvzCzz+ZIsiNtpoFW9+f+itYLTAVW41qk/Hk=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "2b01a5bcf62956a5d641a3367edcd35e103edfcd", "rev": "1989b0049f7fb714a2417dfb14d6b4f3d2a079d3",
"revCount": 5597, "revCount": 5607,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@ -311,11 +311,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735209374, "lastModified": 1735295819,
"narHash": "sha256-V/AE7QfPzfIPW5jC+DaBv5H+Vds0eA02Jkx/+VFhRT4=", "narHash": "sha256-iHDDF1kj+wX7fHGTgKaM6rli6+O8mVFNmpypo+SgnNs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "616e7ef0aca905b9b4012d2bedbb9225d51040bf", "rev": "a41bcdccac7d3fe220b3a8519633f0a812da3439",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -407,6 +407,28 @@
"type": "github" "type": "github"
} }
}, },
"hyprlang_2": {
"inputs": {
"nixpkgs": [
"rose-pine-hyprcursor",
"nixpkgs"
],
"systems": "systems_4"
},
"locked": {
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": { "hyprutils": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -419,11 +441,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734796073, "lastModified": 1735316583,
"narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=", "narHash": "sha256-AiiUwHWHfEdpFzXy7l1x3zInCUa1xcRMrbZ1XRSkzwU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf", "rev": "8f15d45b120b33712f6db477fe5ffb18034d0ea8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -464,11 +486,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734838217, "lastModified": 1735443188,
"narHash": "sha256-zvMLS8BGn+kMG7tLLT3PJ67/S9yqZ9B7V8hKBa9cRRY=", "narHash": "sha256-AydPpRBh8+NOkrLylG7vTsHrGO2b5L7XkMEL5HlzcA8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "d583b2d142f0428313df099f4a2dcf2a0496aa78", "rev": "55ab1e1df5daf2476e6b826b69a82862dcbd7544",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -479,11 +501,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1734649271, "lastModified": 1735291276,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "rev": "634fd46801442d760e09493a794c4f15db2d0cbb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -543,11 +565,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1735291276, "lastModified": 1735471104,
"narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "634fd46801442d760e09493a794c4f15db2d0cbb", "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -558,6 +580,22 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1710272261,
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1729265718, "lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
@ -607,9 +645,30 @@
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"rose-pine-hyprcursor": "rose-pine-hyprcursor",
"yazi": "yazi" "yazi": "yazi"
} }
}, },
"rose-pine-hyprcursor": {
"inputs": {
"hyprlang": "hyprlang_2",
"nixpkgs": "nixpkgs_3",
"utils": "utils"
},
"locked": {
"lastModified": 1733265112,
"narHash": "sha256-FdO+2X7TeIAW73hiyFKZbCjlAskb4xMmYYPX97mo9RE=",
"owner": "ndom91",
"repo": "rose-pine-hyprcursor",
"rev": "89dc9e347ce8da26766ad421b0899536f9f87639",
"type": "github"
},
"original": {
"owner": "ndom91",
"repo": "rose-pine-hyprcursor",
"type": "github"
}
},
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -677,6 +736,21 @@
} }
}, },
"systems_4": { "systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_5": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -691,6 +765,39 @@
"type": "github" "type": "github"
} }
}, },
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [
@ -735,15 +842,15 @@
"yazi": { "yazi": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1735318734, "lastModified": 1735573972,
"narHash": "sha256-p9VfYkunTS8OWo2R1Mvs4pqs/Ymn50KmmSCHyu/UPmA=", "narHash": "sha256-XnjBHfLSoXfIKs/el6ok4ESzjxfVVAe326sfBuu0Dwg=",
"owner": "sxyazi", "owner": "sxyazi",
"repo": "yazi", "repo": "yazi",
"rev": "2770e0259cc83d91b7877b412a27db2dcb1c9427", "rev": "00e8adc3decc370a7e14caaeae3676361549fceb",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -10,5 +10,6 @@ window-theme = ghostty
confirm-close-surface = false confirm-close-surface = false
window-decoration = false window-decoration = false
keybind = ctrl+shift+zero=toggle_tab_overview mouse-hide-while-typing = true
keybind = ctrl+shift+zero=toggle_tab_overview

View file

@ -1,29 +1,17 @@
{ pkgs, ... }: { pkgs, cursor-size, ... }:
let let
cursorName = "catppuccin-macchiato-lavender-cursors"; cursorName = "catppuccin-macchiato-lavender-cursors";
themeName = "catppuccin-macchiato-lavender-compact"; themeName = "catppuccin-macchiato-lavender-compact";
cursorSize = "24"; cursorSize = pkgs.lib.strings.toInt cursor-size;
in in
{ {
home.sessionVariables = {
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = cursorSize;
HYPERCURSOR_SIZE = cursorSize;
};
home.pointerCursor = {
gtk.enable = true;
package = pkgs.catppuccin-cursors.macchiatoLavender;
name = cursorName;
size = 24;
};
gtk = { gtk = {
enable = true; enable = true;
cursorTheme = { cursorTheme = {
name = cursorName; name = cursorName;
package = pkgs.catppuccin-cursors.macchiatoLavender; package = pkgs.catppuccin-cursors.macchiatoLavender;
size = cursorSize;
}; };
theme = { theme = {

View file

@ -1,4 +1,4 @@
{ pkgs, lib, inputs, system, ... }: { pkgs, lib, inputs, system, cursor-size, ... }:
let let
startScript = import ./hypr/exec.nix { inherit pkgs lib inputs system; }; startScript = import ./hypr/exec.nix { inherit pkgs lib inputs system; };
@ -7,11 +7,13 @@ let
windowrule = import ./hypr/windowrule.nix; windowrule = import ./hypr/windowrule.nix;
input = import ./hypr/input.nix; input = import ./hypr/input.nix;
plugins = import ./hypr/plugin.nix; plugins = import ./hypr/plugin.nix;
cursorSize = cursor-size;
cursorName = "catppuccin-macchiato-lavender-cursors";
in in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprpaper hyprpaper
hyprcursor
]; ];
systemd.user.targets.hyprland-session.Unit.Wants = [ systemd.user.targets.hyprland-session.Unit.Wants = [
@ -38,6 +40,12 @@ in
monitor = import ./hypr/monitor.nix; monitor = import ./hypr/monitor.nix;
plugin = plugins; plugin = plugins;
exec-once = ''${startScript}''; exec-once = ''${startScript}'';
env = [
''HYPRCURSOR_THEME, ${cursorName}''
''HYPRCURSOR_SIZE, ${cursorSize}''
''XCURSOR_THEME, ${cursorName}''
''XCURSOR_SIZE, ${cursorSize}''
];
} // window // windowrule // input; } // window // windowrule // input;
}; };

View file

@ -1,5 +1,8 @@
{ lib, system, inputs, nix-version, ... }: { lib, system, inputs, nix-version, ... }:
let
cursor-size = "24";
in
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
@ -15,7 +18,7 @@
system.stateVersion = nix-version; system.stateVersion = nix-version;
home-manager = { home-manager = {
backupFileExtension = "hm-backup"; backupFileExtension = "hm-backup";
extraSpecialArgs = { inherit inputs system nix-version; }; extraSpecialArgs = { inherit inputs system nix-version cursor-size; };
users = { "danny" = import ../../../home; }; users = { "danny" = import ../../../home; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ lib, pkgs, inputs, system, nix-version, ... }: { lib, inputs, system, nix-version, ... }:
let
cursor-size = "32";
in
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
@ -19,7 +22,7 @@
backupFileExtension = "hm-backup"; backupFileExtension = "hm-backup";
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs system nix-version; }; extraSpecialArgs = { inherit inputs system nix-version cursor-size; };
users."danny" = { imports = [ ../../../home ]; }; users."danny" = { imports = [ ../../../home ]; };
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, system, ... }:
{ {
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
@ -83,7 +83,7 @@
# Media # Media
vlc vlc
]) ++ ([ ]) ++ ([
inputs.ghostty.packages.x86_64-linux.default inputs.ghostty.packages.${system}.default
inputs.yazi.packages.x86_64-linux.default # Terminal file manager inputs.yazi.packages.x86_64-linux.default # Terminal file manager
]); ]);
} }