{ config, lib, pkgs, ... }:

let
  cfg = config.nomarchy;
  t = cfg.theme;
  c = t.colors;
in
{
  config = lib.mkIf (pkgs.lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.satty) {
    home.packages = [ pkgs.satty ];

    xdg.configFile."satty/config.toml".text = ''
      [general]
      # Set the default tool to pointer or arrow?
      initial-tool = "arrow"
      copy-command = "wl-copy"
      # Hitting copy also saves? Let the user hit save if they want to save.
      # save-after-copy = false

      [color-palette]
      palette = [
        "${c.accent}ff",
        "${c.bad}ff",
        "${c.warn}ff",
        "${c.good}ff",
        "${c.text}ff",
        "${c.base}ff"
      ]
    '';
  };
}
