{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.mjallen.desktop.hyprland;

  themeSize = "compact"; # [ "standard" "compact" ]
  themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
  themeVariant = "nord"; # [ "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" "black" "rimless" "normal" "float" ]
  themeColor = "dark"; # [ "standard" "light" "dark" ]
  iconThemeVariant = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
  iconScheme = "nord"; # [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" ]

  # Cursor
  cursorTheme = "macOS";
  cursorThemePkg = pkgs.apple-cursor;
  cursorSize = 24;

  # GTK
  # gtkThemeSize = themeSize;
  # gtkThemeAccent = themeAccent;
  # gtkThemeVariant = themeVariant;
  # gtkThemeColor = themeColor;
  gtkTheme = "Colloid-Dark-Compact-Nord";
  gtkThemePkg = pkgs.colloid-gtk-theme.override {
    sizeVariants = [ themeSize ];
    colorVariants = [ themeColor ];
    themeVariants = [ themeAccent ];
    tweaks = [ themeVariant ];
  };

  # Icons
  # iconThemeScheme = iconScheme;
  iconTheme = "Colloid-Nord-Dark";
  iconThemePkg = pkgs.colloid-icon-theme.override {
    schemeVariants = [ iconScheme ];
    colorVariants = [ iconThemeVariant ];
  };

  # Fonts
  fontName = "JetBrainsMono NFM";
  fontPackage = pkgs.nerd-fonts.jetbrains-mono;
  fontSize = 12;
in
{
  config = mkIf cfg.enable {
    home = {
      pointerCursor = {
        gtk.enable = true;
        package = cursorThemePkg;
        name = cursorTheme;
        size = cursorSize;
      };
    };

    dconf = {
      enable = true;
      settings = {
        "org/gnome/desktop/interface".color-scheme = "prefer-dark";
        "org/gnome/desktop/interface".cursor-theme = cursorTheme;
        "org/gnome/desktop/interface".gtk-theme = gtkTheme;
        "org/gnome/desktop/interface".icon-theme = iconTheme;
      };
    };

    gtk = {
      enable = true;

      cursorTheme = {
        name = cursorTheme;
        package = cursorThemePkg;
      };

      theme = {
        name = gtkTheme;
        package = gtkThemePkg;
      };

      iconTheme = {
        name = iconTheme;
        package = iconThemePkg;
      };

      gtk3.extraConfig = {
        gtk-application-prefer-dark-theme = true;
      };

      gtk4.extraConfig = {
        gtk-application-prefer-dark-theme = true;
      };

      font = {
        name = fontName;
        package = fontPackage;
        size = fontSize;
      };
    };
  };
}
