diff --git a/legacyPackages/dracula/default.nix b/legacyPackages/dracula/default.nix index 3d25b27d..a6a2c0c9 100644 --- a/legacyPackages/dracula/default.nix +++ b/legacyPackages/dracula/default.nix @@ -10,6 +10,11 @@ pkgs.lib.makeScope pkgs.newScope (drac: { gtk = import ./gtk.nix {inherit (inputs) gtk-theme-src pkgs;}; + hyprcursor = drac.callPackage ./hyprcursor.nix { + inherit (inputs) gtk-theme-src mkVersion; + inherit pkgs; + }; + plymouth = drac.callPackage ./plymouth.nix { inherit (inputs) dracula-plymouth-src mkVersion; }; diff --git a/legacyPackages/dracula/hyprcursor.nix b/legacyPackages/dracula/hyprcursor.nix new file mode 100644 index 00000000..a0577809 --- /dev/null +++ b/legacyPackages/dracula/hyprcursor.nix @@ -0,0 +1,29 @@ +{ + gtk-theme-src, + mkVersion, + pkgs, + stdenv, + ... +}: +stdenv.mkDerivation { + pname = "dracula-hyprcursor"; + version = mkVersion gtk-theme-src; + + src = "${gtk-theme-src}/kde/cursors"; + + buildInputs = with pkgs; [hyprcursor xcur2png]; + + installPhase = '' + hyprcursor-util --extract ./Dracula-cursors + hyprcursor-util --create ./extracted_Dracula-cursors + + cat < ./extracted_Dracula-cursors/manifest.hl + name = Dracula-cursors + description = Automatically extracted with hyprcursor-util + version = 0.1 + cursors_directory = hyprcursors + EOF + + mv 'theme_Extracted Theme' $out + ''; +} diff --git a/modules/desktop/desktop-environment/home/style.nix b/modules/desktop/desktop-environment/home/style.nix index 87e16da2..3c159ccd 100644 --- a/modules/desktop/desktop-environment/home/style.nix +++ b/modules/desktop/desktop-environment/home/style.nix @@ -1,17 +1,32 @@ -{config, ...}: let +{ + config, + pkgs, + self, + ... +}: let inherit (config.vars) configDir; + + cursorTheme = self.legacyPackages.${pkgs.system}.dracula.hyprcursor; + cursorThemeName = "Dracula-cursors"; + hyprcursorThemeName = "Dracula-hyprcursor"; + cursorSize = "24"; in { imports = [ ../../home/theme ../../home/hyprpaper.nix ]; + home.file.".local/share/icons/${hyprcursorThemeName}".source = cursorTheme; + wayland.windowManager.hyprland = { settings = { - envd = ["XCURSOR_SIZE, 24"]; + envd = [ + "XCURSOR_THEME, ${cursorThemeName}" + "XCURSOR_SIZE, ${cursorSize}" + ]; exec-once = [ - "hyprctl setcursor Dracula-cursors 24" + "hyprctl setcursor ${hyprcursorThemeName} ${cursorSize}" "hyprpaper" ];