{ config, lib, ... }:

let
  cfg = config.subs.waybar;
in
{
  options = {
    subs.waybar.enable = lib.mkOption {
      default = true;
      type = lib.types.bool;
    };
  };

  config = lib.mkIf cfg.enable {
    programs.waybar = {
      enable = true;
    };

    home.file = {
      ".local/bin/waybar-module-pomodoro".source =../../bin/waybar-module-pomodoro;
      ".config/waybar/scripts/launch.sh".source = ../../config/waybar/scripts/launch.sh;
      ".config/waybar/topbar.css".source = ../../config/waybar/topbar.css;
      ".config/waybar/topbar.jsonc".source = ../../config/waybar/topbar.jsonc;
      ".config/waybar/power_menu.xml".source = ../../config/waybar/power_menu.xml;
    };
  };
}
