{
    "layer": "top", // Waybar at top layer
    "spacing": 5,
    "modules-left": ["hyprland/workspaces", "hyprland/window"],
    "modules-right": ["idle_inhibitor", "custom/pending-updates", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight",  "battery", {{ if eq .chezmoi.hostname "angmar" }}"clock#date", {{ end }}"clock#all", "custom/beats", "tray"],
    "hyprland/workspaces": {
        "disable-scroll": true,
        "all-outputs": true,
        "warp-on-scroll": true
    },
    "hyprland/window": {
        "format": "   {}"
    },
    "custom/pending-updates": {
        "format": "{} ",
        "tooltip": false,
        "exec": "echo $(( $(checkupdates | wc -l) + $(yay -Qu | wc -l) ))",
        "restart-interval": 3600,
    },
    "idle_inhibitor": {
        "format": "{icon}",
        "format-icons": {
            "activated": "",
            "deactivated": ""
        }
    },
    "tray": {
        // "icon-size": 21,
        "spacing": 10
    },
    "clock#date": {
        "format": "{:%Y-%m-%d} ",
        "tooltip-format": "{calendar}",
        "calendar": {
            "mode": "year",
            "mode-mon-col": 3,
            "on-scroll": 1,
            "on-click-right": "mode",
            "format": {
                "months": "{}",
                "days": "{}",
                "weeks": "W{}",
                "weekdays": "{}",
                "today": "{}"
            }
        },
    },
    "clock#all": {
        "format": "{:%H:%M} ",
        "format-alt": "{:%Y-%m-%d} ",
        "tooltip-format": "{calendar}",
        "calendar": {
            "mode": "year",
            "mode-mon-col": 3,
            "on-scroll": 1,
            "on-click-right": "mode",
            "format": {
                "months": "{}",
                "days": "{}",
                "weeks": "W{}",
                "weekdays": "{}",
                "today": "{}"
            }
        },
    },
    "custom/beats": {
        "format": "{} ",
        "tooltip": false,
        "exec-if": "/home/amolith/.local/bin/beats",
        "exec": "/home/amolith/.local/bin/beats",
        "return-type": "",
        "restart-interval": 1,
    },
    "cpu": {
        "format": "{usage}% ",
        "tooltip": false
    },
    "memory": {
        "format": "{}% "
    },
    "temperature": {
        "critical-threshold": 80,
        "format": "{temperatureC}°C {icon}",
        "format-icons": ["", "", "", "", ""]
    },
    "backlight": {
        "format": "{percent}% {icon}",
        "format-icons": ["", "", "", "", "", "", "", "", ""]
    },
    "battery": {
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{capacity}% {icon}",
        "format-charging": "{capacity}% ",
        "format-plugged": "{capacity}% ",
        "format-alt": "{time} {icon}",
        "format-icons": [ "", "", "", "", "", "", "", "", "", "" ]     
    },
    "network": {
        "format-wifi": "",
        "format-ethernet": "",
        "tooltip-format": "{ifname} via {gwaddr} ",
        "format-linked": "{ifname} (No IP) ",
        "format-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": "pavucontrol"
    }
}