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,
|
||||
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