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

View file

@ -10,5 +10,6 @@ window-theme = ghostty
confirm-close-surface = 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
cursorName = "catppuccin-macchiato-lavender-cursors";
themeName = "catppuccin-macchiato-lavender-compact";
cursorSize = "24";
cursorSize = pkgs.lib.strings.toInt cursor-size;
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 = {
enable = true;
cursorTheme = {
name = cursorName;
package = pkgs.catppuccin-cursors.macchiatoLavender;
size = cursorSize;
};
theme = {

View file

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

View file

@ -1,5 +1,8 @@
{ lib, system, inputs, nix-version, ... }:
let
cursor-size = "24";
in
{
imports = [
inputs.home-manager.nixosModules.default
@ -15,7 +18,7 @@
system.stateVersion = nix-version;
home-manager = {
backupFileExtension = "hm-backup";
extraSpecialArgs = { inherit inputs system nix-version; };
extraSpecialArgs = { inherit inputs system nix-version cursor-size; };
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 = [
inputs.home-manager.nixosModules.default
@ -19,7 +22,7 @@
backupFileExtension = "hm-backup";
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs system nix-version; };
extraSpecialArgs = { inherit inputs system nix-version cursor-size; };
users."danny" = { imports = [ ../../../home ]; };
};
}

View file

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