Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylix: set GTK icon theme #603

Merged
merged 40 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8d80dd3
test
laycookie Nov 4, 2024
7cb3f89
24.05 compatability
laycookie Nov 4, 2024
04ed32d
24.05 compatability2
laycookie Nov 4, 2024
8326f92
24.05 compatability3
laycookie Nov 4, 2024
5b4aa2b
if check fix
laycookie Nov 4, 2024
a35c997
if check fix2
laycookie Nov 4, 2024
1b3ec7f
if check fix3
laycookie Nov 4, 2024
f777fc7
basic example
laycookie Nov 4, 2024
6305387
fix?
laycookie Nov 5, 2024
646e3a9
fix extra attribute
laycookie Nov 5, 2024
9061cab
allow package to be null
laycookie Nov 5, 2024
f5dd5c6
allow package to be null fix?
laycookie Nov 5, 2024
ae7ecbc
allow package to be null fix2?
laycookie Nov 5, 2024
37a54ce
remove builtins.head
laycookie Nov 5, 2024
f7f4447
remove name for testing
laycookie Nov 5, 2024
212b2c0
testing
laycookie Nov 5, 2024
11db2f9
testing1
laycookie Nov 5, 2024
ce9205d
testing2
laycookie Nov 5, 2024
396dfa3
make light and dark nullable
laycookie Nov 5, 2024
cbaf913
Make iconThemeing optional
laycookie Nov 5, 2024
906cc78
Fix type
laycookie Nov 5, 2024
53e9d3e
Bring it back to unstable
laycookie Nov 5, 2024
01c7336
Small refactor
laycookie Nov 5, 2024
dd65ba8
back to stable
laycookie Nov 5, 2024
7bec692
remove extra enable
laycookie Nov 5, 2024
1e5cfce
error on iconTheme enable
laycookie Nov 5, 2024
86315d0
final refactor (back to unstable)
laycookie Nov 5, 2024
f79e32d
Merge branch 'master' into master
laycookie Nov 7, 2024
9b7f576
Fixing lint errors, and removing debug comments
laycookie Nov 7, 2024
57b44db
!isNull to null !=
laycookie Nov 7, 2024
18141a3
Merge branch 'master' into master
laycookie Nov 7, 2024
7759c32
Merge branch 'master' into master
laycookie Nov 8, 2024
983f5d8
Removing isLinux guard
laycookie Nov 9, 2024
d54c32f
Remove unused binding
laycookie Nov 9, 2024
bb70c8a
Merge branch 'master' into master
laycookie Nov 14, 2024
f8b9227
Merge branch 'master' into master
laycookie Nov 16, 2024
b305078
Merge branch 'master' into master
laycookie Nov 18, 2024
16cfd7d
Merge branch 'master' into master
laycookie Nov 21, 2024
4dcfb39
Merge branch 'master' into master
laycookie Nov 22, 2024
d76f3e8
Merge branch 'master' into master
laycookie Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stylix/hm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in {
../opacity.nix
./cursor.nix
./fonts.nix
./icon.nix
(import ./palette.nix { inherit palette-generator base16; })
(import ../templates.nix inputs)
] ++ autoload;
Expand Down
22 changes: 22 additions & 0 deletions stylix/hm/icon.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ config, lib, ... }:

let
cfg = config.stylix.iconTheme;
inherit (config.stylix) polarity;
in {
imports = [ ../icon.nix ];
config = lib.mkIf (config.stylix.enable && cfg.enable) {
gtk = {
iconTheme = {
inherit (cfg) package;
name = builtins.head (lib.filter (x: null != x) [
({
inherit (cfg) dark light;
}."${polarity}" or null)
cfg.dark
cfg.light
]);
trueNAHO marked this conversation as resolved.
Show resolved Hide resolved
};
};
};
}
26 changes: 26 additions & 0 deletions stylix/icon.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ lib, ... }:

{
options.stylix.iconTheme = {
enable = lib.mkOption {
description = "enable/disable icon theming.";
type = lib.types.bool;
default = false;
};
package = lib.mkOption {
description = "Package providing the icon theme.";
type = lib.types.nullOr lib.types.package;
default = null;
};
light = lib.mkOption {
description = "Light icon theme name.";
type = lib.types.nullOr lib.types.str;
default = null;
};
dark = lib.mkOption {
description = "Dark icon theme name.";
type = lib.types.nullOr lib.types.str;
default = null;
};
};
}