Compare commits
2 commits
main
...
hyprcursor
Author | SHA1 | Date | |
---|---|---|---|
c7c570afb2 | |||
32d6fb98cb |
2 changed files with 27 additions and 12 deletions
|
@ -224,8 +224,11 @@
|
|||
themes = {
|
||||
cursor = {
|
||||
enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://cdn.discordapp.com/attachments/1216066899729977435/1216076659149504643/HyprBibataModernClassicSVG.tar.gz?ex=65ff12a5&is=65ec9da5&hm=a42375c7390aaae1dcb444ac45be60779e7ca14d437a5a927dffabc1b573cc07&";
|
||||
hash = "sha256-KDYoULjJC0Nhdx9Pz5Ezq+1F0tWwkVQIc5buy07hO98=";
|
||||
};
|
||||
name = "HyprBibataModernClassicSVG";
|
||||
size = 24;
|
||||
};
|
||||
gtk = {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.myOptions.themes.cursor;
|
||||
|
@ -8,12 +9,12 @@
|
|||
in {
|
||||
options.myOptions.themes.cursor = {
|
||||
enable = mkEnableOption "enable cursor theming";
|
||||
package = mkOption {
|
||||
description = "cursor theme package";
|
||||
type = types.package;
|
||||
src = mkOption {
|
||||
description = "hyprcursor theme tar url";
|
||||
type = types.path;
|
||||
};
|
||||
name = mkOption {
|
||||
description = "cursor theme name";
|
||||
description = "hyprcursor theme name";
|
||||
type = types.str;
|
||||
};
|
||||
size = mkOption {
|
||||
|
@ -24,15 +25,26 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
XCURSOR_THEME = "${cfg.name}";
|
||||
XCURSOR_SIZE = "${toString cfg.size}";
|
||||
HYPRCURSOR_THEME = cfg.name;
|
||||
HYPRCURSOR_SIZE = toString cfg.size;
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home.pointerCursor = {
|
||||
inherit (cfg) package name size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
home.file.".local/share/icons" = {
|
||||
source = with pkgs; stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = cfg.name;
|
||||
version = "0.1.0";
|
||||
|
||||
inherit (cfg) src;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
mkdir -p $out
|
||||
tar -C $out -x -f $src
|
||||
runHook postBuild
|
||||
'';
|
||||
});
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue