{
  pkgs,
  config,
  ...
} : {
    programs.waybar = {
        enable = true;
        package = pkgs.waybar;
        settings = {
            mainBar = {
                layer = "top";
                position = "top";
                height = 30;
                output = [
                    "eDP-1"
                    "DP-1"
                    "HDMI-A-1"
                    "Virtual-1"
                ];
                modules-left = [ 
                    "hyprland/workspaces"
                    "mpris"
                ];
                modules-center = [
                    "custom/weather"
                ];
                
                modules-right = [
                    "network"
                    "memory"
                    "cpu"
                    "clock"
                ];
                # Widgets
                "sway/workspaces" = {
                    disable-scroll = true;
                    all-outputs = true;
                };
                
                mpris = {
                    format = "{player_icon} {dynamic}";
                    format-paused = "{status_icon} {dynamic}";
                    max-length = 100;
                    
                    player-icons = {
                        default = "⏸";
                        mpv = "🎵";
                    };
                    status-icons = {
                        paused = "▶"; 
                    };
                };
                
                "hyprland/workspaces" = {
                    format = "{icon}";
                    format-icons = {
                        default = "";
                        active = "";
                    };
                };
                network = {
                        tooltip = true;
                        format-wifi = "{icon} ";
                        format-icons = [""  ""  ""]; 
                        rotate = 0;
                        format-ethernet = " ";
                        tooltip-format = "Network = {essid}\nSignal strength: {signaldBm}dBm ({signalStrength}%)\nFrequency: {frequency}MHz\nInterface: {ifname}\nIP: {ipaddr}/{cidr}\nGateway: {gwaddr}\nNetmask: {netmask}";
                        format-linked = " {ifname} (No IP)";
                        format-disconnected = " ";
                        tooltip-format-disconnected = "Disconnected";
                        on-click = "/usr/local/bin/ags -t ControlPanel";
                        interval = 2;
                };
                    
                memory = {
                    interval = 1;
                    rotate = 270;
                    format = "{icon}";
                    format-icons = ["" "" "" "" "" "" "" "" ""];
                    max-length = 10;
                };
                cpu = {
                    interval = 1;
                    format = "{icon}";
                    rotate = 270;
                    format-icons = ["" "" "" "" "" "" "" "" ""];
                };
                clock = {
                    format = "{:%I:%M %p}";
                    rotate = 0;
                    on-click = "/usr/local/bin/ags -t ActivityCenter";
                    tooltip-format = "{calendar}";
                    
                    calendar = {
                        mode = "month";
                        mode-mon-col = 3;
                        on-scroll = 1;
                        on-click-right = "mode";
                        format = {
                            months = "{}";
                            weekdays = "{}";
                            today = "{}";
                        };
                    };
                    actions = {
                        on-click-right = "mode";
                        on-click-forward = "tz_up";
                        on-click-backward = "tz_down";
                        on-scroll-up = "shift_up";
                        on-scroll-down = "shift_down";
                    };
                };
                # Custom Widgets
                "custom/weather" = {
                    exec = "python3 ~/.config/waybar/weather.py waybar";
                    restart-interval = 900;
                    return-type = "json";
                };
            };
        };
    };
    home.file.".config/waybar" = {
        source = ./configs;
        # copy the scripts directory recursively
        recursive = true;
    };
}