From 4a3ac9999d99faa55297726ab7545fb4f6623fef Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 2 Jul 2024 12:50:48 +0300 Subject: [PATCH] Use hyprcursors --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 12 ++++++++++-- modules/hyprland/hyprland.nix | 9 +++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 0584253..bf35392 100644 --- a/flake.lock +++ b/flake.lock @@ -438,6 +438,30 @@ "type": "github" } }, + "hyprcursors": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719779888, + "narHash": "sha256-Jf6Te5Jhbja4Pk6+UeEi3YMxvgMUf/nqHS9PCU1ntOw=", + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", + "rev": "91c03dea2ebfe34dbe64e54921801829dfe23ea8", + "type": "github" + }, + "original": { + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", + "type": "github" + } + }, "hyprland": { "inputs": { "hyprcursor": "hyprcursor", @@ -718,6 +742,7 @@ "github2forgejo": "github2forgejo", "hardware": "hardware", "homeManager": "homeManager", + "hyprcursors": "hyprcursors", "hyprland": "hyprland", "hyprpicker": "hyprpicker", "nixpkgs": "nixpkgs_4", diff --git a/flake.nix b/flake.nix index ea537e3..ec07604 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,13 @@ hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprpicker.url = "github:hyprwm/hyprpicker"; + hyprcursors = { + url = "github:VirtCode/hypr-dynamic-cursors"; + + inputs.hyprland.follows = "hyprland"; + inputs.nixpkgs.follows = "hyprland/nixpkgs"; + }; + ghostty.url = "git+ssh://git@github.com/RGBCube/ghostty"; ghosttyModule.url = "github:clo4/ghostty-hm-module"; @@ -93,8 +100,9 @@ nixpkgsOverlayModule = with lib1; { nixpkgs.overlays = [(final: prev: { - ghostty = inputs.ghostty.packages.${prev.system}.default; - zls = inputs.zls.packages.${prev.system}.default; + ghostty = inputs.ghostty.packages.${prev.system}.default; + hyprcursors = inputs.hyprcursors.packages.${prev.system}.default; + zls = inputs.zls.packages.${prev.system}.default; })] ++ pipe inputs [ attrValues (filter (value: value ? overlays.default)) diff --git a/modules/hyprland/hyprland.nix b/modules/hyprland/hyprland.nix index d6d8d82..b34ccac 100644 --- a/modules/hyprland/hyprland.nix +++ b/modules/hyprland/hyprland.nix @@ -39,6 +39,15 @@ in desktopSystemConfiguration { enableXdgAutostart = true; }; + plugins = with pkgs; [ hyprcursors ]; + + settings.plugin.dynamic-cursors = { + enabled = true; + + mode = "rotate"; + shake = true; + }; + settings = { monitor = [ ", preferred, auto, 1" ];