feat(terra): bigger HyprChrome cursor, also on the greeter
Cursor size 24 -> 36 (with a 36px XCursor frame so X clients don't snap to 32). The greeter's Hyprland gets the same theme via a new homelab.greeter.cursor option, linked into the greeter's ~/.icons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,7 @@ in
|
|||||||
primaryOutput = "DP-2";
|
primaryOutput = "DP-2";
|
||||||
defaultUser = "darman";
|
defaultUser = "darman";
|
||||||
keyboardLayout = "de";
|
keyboardLayout = "de";
|
||||||
|
cursor = { inherit (config.home-manager.users.darman.home.pointerCursor) name size package; };
|
||||||
};
|
};
|
||||||
|
|
||||||
services.flatpak = {
|
services.flatpak = {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ in
|
|||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "HyprChrome";
|
name = "HyprChrome";
|
||||||
package = hyprchromeCursors;
|
package = hyprchromeCursors;
|
||||||
size = 24;
|
size = 36;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
hyprcursor.enable = true;
|
hyprcursor.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# hyprcursor (SVG, so it stays sharp at any size) in a single theme dir.
|
# hyprcursor (SVG, so it stays sharp at any size) in a single theme dir.
|
||||||
let
|
let
|
||||||
name = "HyprChrome";
|
name = "HyprChrome";
|
||||||
xcursorSizes = [ 24 32 48 ];
|
xcursorSizes = [ 24 32 36 48 ];
|
||||||
|
|
||||||
# hotspot on the 32px grid, as in the canvas; aliases are the X11/CSS names
|
# hotspot on the 32px grid, as in the canvas; aliases are the X11/CSS names
|
||||||
# that should resolve to this shape.
|
# that should resolve to this shape.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ let
|
|||||||
cfg = config.homelab.greeter;
|
cfg = config.homelab.greeter;
|
||||||
hyprland = config.programs.hyprland.package;
|
hyprland = config.programs.hyprland.package;
|
||||||
toLua = lib.generators.toLua { };
|
toLua = lib.generators.toLua { };
|
||||||
|
greeterHome = config.users.users.greeter.home;
|
||||||
|
|
||||||
shellDir = ../../dotfiles/quickshell;
|
shellDir = ../../dotfiles/quickshell;
|
||||||
|
|
||||||
@@ -32,6 +33,12 @@ let
|
|||||||
hl.env("QS_GREETER_USER", ${toLua cfg.defaultUser})
|
hl.env("QS_GREETER_USER", ${toLua cfg.defaultUser})
|
||||||
hl.env("QS_GREETER_HOST", ${toLua config.networking.hostName})
|
hl.env("QS_GREETER_HOST", ${toLua config.networking.hostName})
|
||||||
hl.env("QS_GREETER_SESSION", "start-hyprland")
|
hl.env("QS_GREETER_SESSION", "start-hyprland")
|
||||||
|
${lib.optionalString (cfg.cursor != null) ''
|
||||||
|
hl.env("HYPRCURSOR_THEME", ${toLua cfg.cursor.name})
|
||||||
|
hl.env("HYPRCURSOR_SIZE", "${toString cfg.cursor.size}")
|
||||||
|
hl.env("XCURSOR_THEME", ${toLua cfg.cursor.name})
|
||||||
|
hl.env("XCURSOR_SIZE", "${toString cfg.cursor.size}")
|
||||||
|
''}
|
||||||
|
|
||||||
hl.on("hyprland.start", function()
|
hl.on("hyprland.start", function()
|
||||||
hl.exec_cmd("${session}")
|
hl.exec_cmd("${session}")
|
||||||
@@ -58,6 +65,11 @@ in
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "us";
|
default = "us";
|
||||||
};
|
};
|
||||||
|
cursor = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.attrs;
|
||||||
|
default = null;
|
||||||
|
description = "{ name, size, package } cursor theme; reuse the user's pointerCursor.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@@ -72,5 +84,12 @@ in
|
|||||||
home = "/var/lib/greeter";
|
home = "/var/lib/greeter";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ~/.icons is searched by both hyprcursor and libXcursor; the greeter's
|
||||||
|
# XDG_DATA_DIRS isn't something we control.
|
||||||
|
systemd.tmpfiles.rules = lib.optionals (cfg.cursor != null) [
|
||||||
|
"d ${greeterHome}/.icons 0755 greeter greeter -"
|
||||||
|
"L+ ${greeterHome}/.icons/${cfg.cursor.name} - - - - ${cfg.cursor.package}/share/icons/${cfg.cursor.name}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user