{ pkgs, ... }:
builtins.toJSON {
    "layer" = "top"; # Waybar at top layer
    # "position" = "bottom"; # Waybar position (top|bottom|left|right)
    "height" = 30; # Waybar height (to be removed for auto height)
    "spacing" = 4; # Gaps between modules (4px)
    "start_hidden" = false;
    "modules-right" = [
      "mpris"
      "privacy"
      "idle_inhibitor"
      "pulseaudio"
      "network"
      "backlight"
      "power-profiles-daemon"
      "battery"
      "clock"
      "tray"
    ];
    "modules-left" = [
      # "group/group-power"
      "hyprland/workspaces"
    ];

    "keyboard-state" = {
      "numlock" = true;
      "capslock" = true;
      "format" = "{name} {icon}";
      "format-icons" = {
        "locked" = "ÔÄ£";
        "unlocked" = "ÔÇú";
      };
    };
    "mpd" = {
      "format" = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ‚∏®{songPosition}|{queueLength}‚∏© {volume}% ÔÄÅ";
      "format-disconnected" = "Disconnected ÔÄÅ";
      "format-stopped" = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ÔÄÅ";
      "unknown-tag" = "N/A";
      "interval" = 5;
      "consume-icons" = {
        "on" = "ÔÉÑ ";
      };
      "random-icons" = {
        "off" = "<span color=\"#f53c3c\">ÔÅ¥</span> ";
        "on" = "ÔÅ¥ ";
      };
      "repeat-icons" = {
        "on" = "ÔÄû ";
      };
      "single-icons" = {
        "on" = "ÔÄû1 ";
      };
      "state-icons" = {
        "paused" = "ÔÅå";
        "playing" = "ÔÅã";
      };
      "tooltip-format" = "MPD (connected)";
      "tooltip-format-disconnected" = "MPD (disconnected)";
    };
    "mpris" = {
      "player" = "${pkgs.playerctl}/bin/playerctl";
      "format" = "{player_icon} {dynamic}";
      "format-paused" = "{status_icon} <i>{dynamic}</i>";
      "player-icons" = {
        "default" = "‚ñ∂";
        "mpv" = "üéµ";
      };
      "status-icons" = {
        "paused" = "‚è∏";
      };
      # "ignored-players": ["firefox"]
    };
    "privacy" = {
      "icon-spacing" = 4;
      "icon-size" = 18;
      "transition-duration" = 250;
      "modules" = [
        {
          "type" = "screenshare";
          "tooltip" = true;
          "tooltip-icon-size" = 24;
        }
        {
          "type" = "audio-out";
          "tooltip" = true;
          "tooltip-icon-size" = 24;
        }
        {
          "type" = "audio-in";
          "tooltip" = true;
          "tooltip-icon-size" = 24;
        }
      ];
    };
    "hyprland/workspaces" = {
      "format" = "{name}";
    };
    "idle_inhibitor" = {
      "format" = "{icon}";
      "format-icons" = {
        "activated" = "ÔÅÆ";
        "deactivated" = "ÔÅ∞";
      };
    };
    "tray" = {
      "icon-size" = 21;
      "spacing" = 10;
    };
    "clock" = {
      # "timezone" = "America/New_York";
      "tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
      "format" = "{:%m/%d %a %T}";
      "interval" = 1;
      "format-alt" = "{:%m/%d %a %T}";
    };
    "cpu" = {
      "interval" = 1;
      "format" = "{usage}% Ôãõ";
      "tooltip" = false;
    };
    "memory" = {
        "format" = "{}% ÔÉâ";
    };
    "temperature" = {
      "interval" = 1;
      # "thermal-zone" = 2;
      # "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
      "critical-threshold" = 80;
      # "format-critical" = "{temperatureC}¬∞C {icon}";
      "format" = "{temperatureC}¬∞C {icon}";
      "format-icons" = ["Ôù´" "Ôãâ" "Ôù©"];
    };
    "backlight" = {
      "format" = "{percent}% {icon}";
      "format-icons" = ["Óéç" "Óèì" "Óèë" "Óèè" "Óèé" "Óèç" "Óèä" "Óèà" "Óéõ"];
    };
    "battery" = {
      "states" = {
        # "good" = 95;
        "warning" = 20;
        "critical" = 10;
      };
      "format" = "{capacity}% {icon}";
      "format-full" = "{capacity}% {icon}";
      "format-charging" = "{capacity}% ‚ö°";
      "format-plugged" = "{capacity}% Ôá¶";
      "format-alt" = "{time} {icon}";
      # "format-good" = ""; # An empty format will hide the module
      # "format-full" = "";
      "format-icons" = ["ÔâÑ" "ÔâÉ" "ÔâÇ" "ÔâÅ" "ÔâÄ"];
    };
    "power-profiles-daemon" = {
      "format" = "{icon}";
      "tooltip-format" = "Power profile = {profile}\nDriver = {driver}";
      "tooltip" = true;
      "format-icons" = {
        "default" = "ÔÉß";
        "performance" = "ÔÉß";
        "balanced" = "Ôâé";
        "power-saver" = "ÔÅ¨";
      };
    };
    "network" = {
      # "interface" = "wlp2*"; # (Optional) To force the use of this interface
      "format-wifi" = "{essid} ({signalStrength}%) Ôá´";
      "format-ethernet" = "{ipaddr}/{cidr} Û∞àÄ";
      "tooltip-format" = "{ifname} via {gwaddr} Ôûñ";
      "format-linked" = "{ifname} (No IP) Ôûñ";
      "format-disconnected" = "Disconnected ‚ö†";
      "format-alt" = "{ifname} = {ipaddr}/{cidr}";
    };
    "pulseaudio" = {
      # "scroll-step" = 1; # %; can be a float
      "format" = "{volume}% {icon} {format_source}";
      "format-bluetooth" = "{volume}% {icon}Ôäî {format_source}";
      "format-bluetooth-muted" = "Ôö© {icon}Ôäî {format_source}";
      "format-muted" = "Ôö© {format_source}";
      "format-source" = "{volume}% ÔÑ∞";
      "format-source-muted" = "ÔÑ±";
      "format-icons" = {
        "headphone" = "ÔÄ•";
        "hands-free" = "Ôñê";
        "headset" = "Ôñê";
        "phone" = "ÔÇï";
        "portable" = "ÔÇï";
        "car" = "ÔÜπ";
        "default" = ["ÔÄ¶" "ÔÄß" "ÔÄ®"];
      };
      "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
      "on-click-right" = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle";
      "on-scroll-up" = "${pkgs.wireplumber}/bin/wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 1%+";
      "on-scroll-down" = "${pkgs.wireplumber}/bin/wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 1%-";
    };

    "group/group-power" = {
      "orientation" = "inherit";
      "modules" = [
        "custom/power"
        "custom/reboot"
      ];
    };
    "custom/quit"= {
      "format"= "Û∞óº";
      "tooltip"= false;
      "on-click"= "hyprctl dispatch exit";
    };
    "custom/lock"= {
      "format"= "Û∞çÅ";
      "tooltip"= false;
      "on-click"= "hyprlock";
    };
    "custom/reboot"= {
      "format"= "Û∞úâ";
      "tooltip"= false;
      "on-click"= "reboot";
    };
    "custom/power"= {
      "format"= "ÔÄë";
      "tooltip"= false;
      "on-click"= "poweroff";
    };
}