{
  pkgs,
  lib,
  myConfig,
  ...
}: {
  # This enables the btop configuration file generation in your home directory.
  # The btop package itself is now installed system-wide via modules/nixos/btop.nix
  programs.btop = {
    enable = true;
    settings = {
      vim_keys = true;
      color_theme = "TTY";
      theme_background = false;
      presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty cpu:0:default,mem:0:default,net:0:default,gpu0:0:default";
    };
  };

  # This updates your Hyprland settings to use the btop-power wrapper.
  wayland.windowManager.hyprland.settings = lib.mkMerge [
    {
      bindd = [
        "CTRL SHIFT, Escape, Open Btop Minimal, exec, uwsm app -- xdg-terminal-exec -e btop-power -p 2"
      ];
    }
    (lib.mkIf (myConfig.btop.autostart) {
      exec-once = [
        "uwsm app -- xdg-terminal-exec -e btop-power -p 2"
      ];
      windowrule = [
        "match:title ^(btop)$, monitor ${myConfig.btop.monitor}"
      ];
    })
  ];
}