From e6ceacb63b59b1351a4a8c9c5efdec057cfe44f2 Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Fri, 16 Oct 2026 01:41:20 +0200 Subject: [PATCH] feat(terra): HyprChrome cursor theme Built from the HyprChrome Cursors canvas: 20 shapes as XCursor (24/32/48) plus SVG hyprcursor, replacing Bibata. Co-Authored-By: Claude Opus 5.5 --- hosts/terra/home/theme.nix | 5 +- pkgs/hyprchrome-cursors.nix | 96 ++++++++++++++++++++++++ pkgs/hyprchrome-cursors/alias.svg | 8 ++ pkgs/hyprchrome-cursors/context-menu.svg | 8 ++ pkgs/hyprchrome-cursors/copy.svg | 8 ++ pkgs/hyprchrome-cursors/crosshair.svg | 9 +++ pkgs/hyprchrome-cursors/default.svg | 5 ++ pkgs/hyprchrome-cursors/ew-resize.svg | 5 ++ pkgs/hyprchrome-cursors/grab.svg | 5 ++ pkgs/hyprchrome-cursors/grabbing.svg | 5 ++ pkgs/hyprchrome-cursors/help.svg | 8 ++ pkgs/hyprchrome-cursors/move.svg | 7 ++ pkgs/hyprchrome-cursors/nesw-resize.svg | 5 ++ pkgs/hyprchrome-cursors/not-allowed.svg | 4 + pkgs/hyprchrome-cursors/ns-resize.svg | 5 ++ pkgs/hyprchrome-cursors/nwse-resize.svg | 5 ++ pkgs/hyprchrome-cursors/pointer.svg | 6 ++ pkgs/hyprchrome-cursors/progress.svg | 10 +++ pkgs/hyprchrome-cursors/text.svg | 5 ++ pkgs/hyprchrome-cursors/wait.svg | 11 +++ pkgs/hyprchrome-cursors/zoom-in.svg | 6 ++ pkgs/hyprchrome-cursors/zoom-out.svg | 6 ++ 22 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 pkgs/hyprchrome-cursors.nix create mode 100644 pkgs/hyprchrome-cursors/alias.svg create mode 100644 pkgs/hyprchrome-cursors/context-menu.svg create mode 100644 pkgs/hyprchrome-cursors/copy.svg create mode 100644 pkgs/hyprchrome-cursors/crosshair.svg create mode 100644 pkgs/hyprchrome-cursors/default.svg create mode 100644 pkgs/hyprchrome-cursors/ew-resize.svg create mode 100644 pkgs/hyprchrome-cursors/grab.svg create mode 100644 pkgs/hyprchrome-cursors/grabbing.svg create mode 100644 pkgs/hyprchrome-cursors/help.svg create mode 100644 pkgs/hyprchrome-cursors/move.svg create mode 100644 pkgs/hyprchrome-cursors/nesw-resize.svg create mode 100644 pkgs/hyprchrome-cursors/not-allowed.svg create mode 100644 pkgs/hyprchrome-cursors/ns-resize.svg create mode 100644 pkgs/hyprchrome-cursors/nwse-resize.svg create mode 100644 pkgs/hyprchrome-cursors/pointer.svg create mode 100644 pkgs/hyprchrome-cursors/progress.svg create mode 100644 pkgs/hyprchrome-cursors/text.svg create mode 100644 pkgs/hyprchrome-cursors/wait.svg create mode 100644 pkgs/hyprchrome-cursors/zoom-in.svg create mode 100644 pkgs/hyprchrome-cursors/zoom-out.svg diff --git a/hosts/terra/home/theme.nix b/hosts/terra/home/theme.nix index cac4704..12c0803 100644 --- a/hosts/terra/home/theme.nix +++ b/hosts/terra/home/theme.nix @@ -5,6 +5,7 @@ let azureGlassyDarkIcons = pkgs.callPackage ../../../pkgs/azure-glassy-dark-icons.nix { }; amyDarkIcons = pkgs.callPackage ../../../pkgs/amy-dark-icons.nix { }; slotBeautyDarkIcons = pkgs.callPackage ../../../pkgs/slot-beauty-dark-icons.nix { }; + hyprchromeCursors = pkgs.callPackage ../../../pkgs/hyprchrome-cursors.nix { }; iconTheme = "Amy-Dark-Icons"; iconThemePackage = amyDarkIcons; @@ -29,8 +30,8 @@ in # bind-mounted in though, so the ~/.icons symlink `dotIcons` drops still # resolves — same fix as the flatpak workaround below. home.pointerCursor = { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; + name = "HyprChrome"; + package = hyprchromeCursors; size = 24; gtk.enable = true; hyprcursor.enable = true; diff --git a/pkgs/hyprchrome-cursors.nix b/pkgs/hyprchrome-cursors.nix new file mode 100644 index 0000000..38097c6 --- /dev/null +++ b/pkgs/hyprchrome-cursors.nix @@ -0,0 +1,96 @@ +{ lib, stdenvNoCC, librsvg, xcursorgen, hyprcursor }: + +# HyprChrome cursors, drawn as the "HyprChrome Cursors" design canvas +# (claude.ai/artifact/Ls3fchoxzc2o9F5jFCuJBy). One 32px-grid SVG per shape in +# ./hyprchrome-cursors; built as both XCursor (X11/XWayland, GTK, Steam) and +# hyprcursor (SVG, so it stays sharp at any size) in a single theme dir. +let + name = "HyprChrome"; + xcursorSizes = [ 24 32 48 ]; + + # hotspot on the 32px grid, as in the canvas; aliases are the X11/CSS names + # that should resolve to this shape. + shapes = { + default = { hs = [ 5 3 ]; aliases = [ "left_ptr" "arrow" "top_left_arrow" "left_arrow" ]; }; + pointer = { hs = [ 13 3 ]; aliases = [ "hand2" "hand1" "hand" "pointing_hand" ]; }; + text = { hs = [ 16 16 ]; aliases = [ "xterm" "ibeam" "vertical-text" ]; }; + crosshair = { hs = [ 16 16 ]; aliases = [ "cross" "tcross" "cross_reverse" "diamond_cross" "cell" "plus" ]; }; + wait = { hs = [ 16 16 ]; aliases = [ "watch" "clock" ]; }; + progress = { hs = [ 4 2 ]; aliases = [ "left_ptr_watch" "half-busy" ]; }; + help = { hs = [ 4 2 ]; aliases = [ "question_arrow" "whats_this" "left_ptr_help" ]; }; + context-menu = { hs = [ 4 2 ]; aliases = [ ]; }; + copy = { hs = [ 4 2 ]; aliases = [ "dnd-copy" ]; }; + alias = { hs = [ 4 2 ]; aliases = [ "dnd-link" "link" ]; }; + move = { hs = [ 16 16 ]; aliases = [ "fleur" "all-scroll" "size_all" "dnd-move" "pointer-move" ]; }; + grab = { hs = [ 16 16 ]; aliases = [ "openhand" ]; }; + grabbing = { hs = [ 16 16 ]; aliases = [ "closedhand" "dnd-none" ]; }; + not-allowed = { hs = [ 16 16 ]; aliases = [ "no-drop" "forbidden" "circle" "crossed_circle" "dnd-no-drop" ]; }; + zoom-in = { hs = [ 13 11 ]; aliases = [ "zoom_in" ]; }; + zoom-out = { hs = [ 13 11 ]; aliases = [ "zoom_out" ]; }; + ew-resize = { hs = [ 16 16 ]; aliases = [ "e-resize" "w-resize" "col-resize" "sb_h_double_arrow" "h_double_arrow" "size_hor" "split_h" "left_side" "right_side" ]; }; + ns-resize = { hs = [ 16 16 ]; aliases = [ "n-resize" "s-resize" "row-resize" "sb_v_double_arrow" "v_double_arrow" "double_arrow" "size_ver" "split_v" "top_side" "bottom_side" ]; }; + nwse-resize = { hs = [ 16 16 ]; aliases = [ "nw-resize" "se-resize" "size_fdiag" "bd_double_arrow" "top_left_corner" "bottom_right_corner" ]; }; + nesw-resize = { hs = [ 16 16 ]; aliases = [ "ne-resize" "sw-resize" "size_bdiag" "fd_double_arrow" "top_right_corner" "bottom_left_corner" ]; }; + }; + + # same rounding hyprcursor applies to its fractional hotspots + px = size: v: toString (builtins.floor (v * size / 32.0 + 0.5)); + frac = v: toString (v / 32.0); + + buildShape = shape: { hs, aliases }: let x = lib.elemAt hs 0; y = lib.elemAt hs 1; in '' + mkdir -p work/hyprcursors/${shape} + cp ${shape}.svg work/hyprcursors/${shape}/ + cat > work/hyprcursors/${shape}/meta.hl < ${shape}.cfg + ${lib.concatMapStrings (s: '' + rsvg-convert -w ${toString s} -h ${toString s} ${shape}.svg -o ${shape}-${toString s}.png + echo "${toString s} ${px s x} ${px s y} ${shape}-${toString s}.png" >> ${shape}.cfg + '') xcursorSizes} + xcursorgen ${shape}.cfg "$theme/cursors/${shape}" + ${lib.concatMapStrings (a: "ln -s ${shape} \"$theme/cursors/${a}\"\n") aliases} + ''; +in +stdenvNoCC.mkDerivation { + pname = "hyprchrome-cursors"; + version = "0.1"; + + src = ./hyprchrome-cursors; + + nativeBuildInputs = [ librsvg xcursorgen hyprcursor ]; + + installPhase = '' + runHook preInstall + theme="$out/share/icons/${name}" + mkdir -p "$theme/cursors" work + + cat > "$theme/index.theme" < work/manifest.hl < + + + + + + + diff --git a/pkgs/hyprchrome-cursors/context-menu.svg b/pkgs/hyprchrome-cursors/context-menu.svg new file mode 100644 index 0000000..fe366d0 --- /dev/null +++ b/pkgs/hyprchrome-cursors/context-menu.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/copy.svg b/pkgs/hyprchrome-cursors/copy.svg new file mode 100644 index 0000000..7f25e5c --- /dev/null +++ b/pkgs/hyprchrome-cursors/copy.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/crosshair.svg b/pkgs/hyprchrome-cursors/crosshair.svg new file mode 100644 index 0000000..59184b9 --- /dev/null +++ b/pkgs/hyprchrome-cursors/crosshair.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/default.svg b/pkgs/hyprchrome-cursors/default.svg new file mode 100644 index 0000000..cdae78e --- /dev/null +++ b/pkgs/hyprchrome-cursors/default.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/ew-resize.svg b/pkgs/hyprchrome-cursors/ew-resize.svg new file mode 100644 index 0000000..c2b70be --- /dev/null +++ b/pkgs/hyprchrome-cursors/ew-resize.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/grab.svg b/pkgs/hyprchrome-cursors/grab.svg new file mode 100644 index 0000000..7696170 --- /dev/null +++ b/pkgs/hyprchrome-cursors/grab.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/grabbing.svg b/pkgs/hyprchrome-cursors/grabbing.svg new file mode 100644 index 0000000..5f67114 --- /dev/null +++ b/pkgs/hyprchrome-cursors/grabbing.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/help.svg b/pkgs/hyprchrome-cursors/help.svg new file mode 100644 index 0000000..7c28c58 --- /dev/null +++ b/pkgs/hyprchrome-cursors/help.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/move.svg b/pkgs/hyprchrome-cursors/move.svg new file mode 100644 index 0000000..591c9d1 --- /dev/null +++ b/pkgs/hyprchrome-cursors/move.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/pkgs/hyprchrome-cursors/nesw-resize.svg b/pkgs/hyprchrome-cursors/nesw-resize.svg new file mode 100644 index 0000000..a63b8ae --- /dev/null +++ b/pkgs/hyprchrome-cursors/nesw-resize.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/not-allowed.svg b/pkgs/hyprchrome-cursors/not-allowed.svg new file mode 100644 index 0000000..84b9ff0 --- /dev/null +++ b/pkgs/hyprchrome-cursors/not-allowed.svg @@ -0,0 +1,4 @@ + + + + diff --git a/pkgs/hyprchrome-cursors/ns-resize.svg b/pkgs/hyprchrome-cursors/ns-resize.svg new file mode 100644 index 0000000..b0b62e8 --- /dev/null +++ b/pkgs/hyprchrome-cursors/ns-resize.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/nwse-resize.svg b/pkgs/hyprchrome-cursors/nwse-resize.svg new file mode 100644 index 0000000..1a9587b --- /dev/null +++ b/pkgs/hyprchrome-cursors/nwse-resize.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/pointer.svg b/pkgs/hyprchrome-cursors/pointer.svg new file mode 100644 index 0000000..9620cba --- /dev/null +++ b/pkgs/hyprchrome-cursors/pointer.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pkgs/hyprchrome-cursors/progress.svg b/pkgs/hyprchrome-cursors/progress.svg new file mode 100644 index 0000000..1aa04d1 --- /dev/null +++ b/pkgs/hyprchrome-cursors/progress.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/text.svg b/pkgs/hyprchrome-cursors/text.svg new file mode 100644 index 0000000..eba6dac --- /dev/null +++ b/pkgs/hyprchrome-cursors/text.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/pkgs/hyprchrome-cursors/wait.svg b/pkgs/hyprchrome-cursors/wait.svg new file mode 100644 index 0000000..0252159 --- /dev/null +++ b/pkgs/hyprchrome-cursors/wait.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/pkgs/hyprchrome-cursors/zoom-in.svg b/pkgs/hyprchrome-cursors/zoom-in.svg new file mode 100644 index 0000000..e4d03eb --- /dev/null +++ b/pkgs/hyprchrome-cursors/zoom-in.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pkgs/hyprchrome-cursors/zoom-out.svg b/pkgs/hyprchrome-cursors/zoom-out.svg new file mode 100644 index 0000000..bcb4ee0 --- /dev/null +++ b/pkgs/hyprchrome-cursors/zoom-out.svg @@ -0,0 +1,6 @@ + + + + + +