forked from poz/niksos
initial hyprcursor work
This commit is contained in:
parent
ef97bd4225
commit
32d6fb98cb
1 changed files with 22 additions and 10 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: with lib; let
|
}: with lib; let
|
||||||
cfg = config.myOptions.themes.cursor;
|
cfg = config.myOptions.themes.cursor;
|
||||||
|
@ -8,12 +9,12 @@
|
||||||
in {
|
in {
|
||||||
options.myOptions.themes.cursor = {
|
options.myOptions.themes.cursor = {
|
||||||
enable = mkEnableOption "enable cursor theming";
|
enable = mkEnableOption "enable cursor theming";
|
||||||
package = mkOption {
|
src = mkOption {
|
||||||
description = "cursor theme package";
|
description = "hyprcursor theme tar url";
|
||||||
type = types.package;
|
type = types.path;
|
||||||
};
|
};
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
description = "cursor theme name";
|
description = "hyprcursor theme name";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
size = mkOption {
|
size = mkOption {
|
||||||
|
@ -24,15 +25,26 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
XCURSOR_THEME = "${cfg.name}";
|
HYPRCURSOR_THEME = cfg.name;
|
||||||
XCURSOR_SIZE = "${toString cfg.size}";
|
HYPRCURSOR_SIZE = toString cfg.size;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
home.pointerCursor = {
|
home.file.".local/share/icons" = {
|
||||||
inherit (cfg) package name size;
|
source = with pkgs; stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
gtk.enable = true;
|
pname = cfg.name;
|
||||||
x11.enable = true;
|
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