-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added cursor support and theming to stylix
- Loading branch information
sntx
committed
Oct 16, 2023
1 parent
feceaa9
commit 87325e6
Showing
6 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ pkgs, config, lib, ... } @ args: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.stylix.cursor; | ||
fromOs = import ./fromos.nix { inherit lib args; }; | ||
in { | ||
options.stylix.cursor = { | ||
name = mkOption { | ||
description = mdDoc "The cursor name within the package."; | ||
type = types.str; | ||
default = fromOs [ "cursor" "name" ] "Vanilla-DMZ"; | ||
}; | ||
package = mkOption { | ||
description = mdDoc "Package providing the cursor theme."; | ||
type = types.package; | ||
default = fromOs [ "cursor" "package" ] pkgs.vanilla-dmz; | ||
}; | ||
size = mkOption { | ||
description = mdDoc "The cursor size."; | ||
type = types.int; | ||
default = fromOs [ "cursor" "size" ] 32; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
let | ||
cfg = config.stylix.cursor; | ||
|
||
in { | ||
imports = [ ../cursor.nix ]; | ||
|
||
config = mkIf ((builtins.match ".*-linux" "${pkgs.system}") != null) { | ||
home.pointerCursor = { | ||
name = "${cfg.name}"; | ||
package = cfg.package; | ||
size = cfg.size; | ||
x11 = { | ||
enable = true; | ||
defaultCursor = "${cfg.name}"; | ||
}; | ||
gtk.enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ config, ... }: | ||
|
||
let | ||
cfg = config.stylix.cursor; | ||
in { | ||
imports = [ ../cursor.nix ]; | ||
config = { | ||
environment.variables.XCURSOR_SIZE = "${toString cfg.size}"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters