Skip to content

Commit

Permalink
reusable gtk theme config
Browse files Browse the repository at this point in the history
draft implementation of reusable theme configs
  • Loading branch information
Octelly committed Mar 22, 2024
1 parent 49229c1 commit 5559c34
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions modules/home/themes/gtk/adw-gtk3/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ pkgs, lib, config, ... }:
let
cfg = config.themes.gtk.adw-gtk3;
in
with lib; {
options.themes.gtk.adw-gtk3 =
{
enable = mkEnableOption "Use adw-gtk3 theme";
scheme = mkOption {
type = with types; (enum [ "light" "dark" ]);
description = "Theme colour scheme";
};
};

config = mkIf cfg.enable {
home.packages = with pkgs; [
adw-gtk3
];

gtk = {
enable = true;
theme.name =
if cfg.scheme == "dark"
then "adw-gtk3-dark" else "adw-gtk3-light";
};

dconf.settings."org/gnome/desktop/interface" = {
"color-scheme" = mkDefault
(if cfg.scheme == "dark"
then "prefer-dark" else "prefer-light");
};
};
}

0 comments on commit 5559c34

Please sign in to comment.