Add Miku cursor

This commit is contained in:
2025-10-09 22:42:07 +03:00
parent 9706b7954c
commit c4ceb67dfc
+85 -8
View File
@@ -1,4 +1,85 @@
{ pkgs, config, lib, host, ... }: { { pkgs, config, lib, ... }: let
miku-cursor = pkgs.stdenv.mkDerivation {
name = "Miku cursor";
# Hatsune Miku Cursor
# Author: NOiiRE ❖
# https://ko-fi.com/s/dcea0e990f
src = pkgs.fetchzip {
name = "MikuCursor.zip";
url = "https://ko-fi.com/api/file-upload/cf0bb0a7-feb8-4090-8e2e-68fd33b7b040/download?transactionId=684d8995-2014-4f9f-bb77-39e4dae3bad7";
curlOpts = "-A HTTPie/3.2.4";
extension = "zip";
hash = "sha256-WYk8Hh92IE3CyUCAOp7QMKrYN8Hpt/cs+O17jhh5tJs=";
};
nativeBuildInputs = [ pkgs.win2xcur ];
patchPhase = ''
rm 02-Link.ani
pwd
echo $src
mkdir Miku/cursors -p
win2xcur $src/*.ani -o Miku/cursors
cd Miku/
echo "[Icon theme]" > index.theme
echo "Name=Miku Cursor" >> index.theme
cd cursors/
mv 'Miku normal' default
ln -s default left_ptr
ln -s default arrow
mv 'Miku link' pointer
ln -s pointer hand2
mv 'Miku busy' wait
ln -s wait progress
mv 'Miku help' help
ln -s help question_arrow
mv 'Miku text' text
ln -s text xterm
mv 'Miku hand' pencil
mv 'Miku precision' cross
ln -s cross crosshair
ln -s cross tcross
mv 'Miku unavailable' not-allowed
# mv 'Miku location' ?
# mv 'Miku person' ?
mv 'Miku vert' ns-resize
ln -s ns-resize n-resize
ln -s ns-resize s-resize
ln -s ns-resize v_double_arrow
ln -s ns-resize sb_v_double_arrow
mv 'Miku horz' ew-resize
ln -s ew-resize e-resize
ln -s ew-resize w-resize
ln -s ew-resize h_double_arrow
ln -s ew-resize sb_h_double_arrow
ln -s ew-resize left_side
ln -s ew-resize right_side
mv 'Miku dgn1' nw-resize
ln -s nw-resize top_left_corner
ln -s nw-resize bottom_right_corner
mv 'Miku dgn2' ne-resize
ln -s ne-resize top_right_corner
ln -s ne-resize bottom_left_corner
mv 'Miku move' move
ln -s move nesw-resize
ln -s move grab
ln -s move grabbing
ln -s move fleur
# mv 'Miku alt' ?
cd ../..
'';
installPhase = ''
mkdir $out/share/icons -p
cp Miku $out/share/icons -r
'';
};
in {
stylix = { stylix = {
enable = true; enable = true;
targets = { targets = {
@@ -21,14 +102,10 @@
dark = "Pop-Dark"; dark = "Pop-Dark";
}; };
cursor = if host.name == "Impreza" then { cursor = {
name = "catppuccin-mocha-pink-cursors"; name = "Miku";
size = 16; size = 16;
package = pkgs.catppuccin-cursors.mochaPink; package = miku-cursor;
} else {
name = "catppuccin-mocha-peach-cursors";
size = 16;
package = pkgs.catppuccin-cursors.mochaPeach;
}; };
fonts = { fonts = {