// ~/.config/waybar/config.jsonc
{
    "layer": "top",
    "position": "top",
    "height": 35,
    "modules-left": ["hyprland/workspaces"],
    "modules-center": [],
    "modules-right": ["tray", "wireplumber", "custom/pixelbuds", "custom/anc", "network", "cpu", "memory", "custom/tlp", "clock", "custom/power"],

    "hyprland/workspaces": {
        "format": "{icon}",
        "on-click": "activate"
    },
    "hyprland/window": {
        "format": "{}",
        "max-length": 35
    },
    "clock": {
        "format": "{:%H:%M}",
        "format-alt": "{:%a, %b %d}",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
    },
    "cpu": {
        "format": "CPU: {usage}%",
        "tooltip": true
    },
    "memory": {
        "format": "MEM: {}%"
    },
    "network": {
        "format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
        "format-ethernet": "{ifname}: {ipaddr}",
        "format-disconnected": "Disconnected",
        "tooltip-format": "{ifname} via {gwaddr}",
    },
	"wireplumber": {
        "format": "{volume}% {icon}",
        "format-muted": "Muted ",
        "format-icons": {
            "headphone": "",
            "hands-free": "",
            "default": ["", ""]
        },
        "on-click": "pavucontrol",
        "scroll-step": 1
    },

    "pulseaudio": {
        "format": "{icon} {volume}%",
        "format-muted": " Muted",
        "format-icons": {
            "headphone": "",
            "hands-free": "",
            "headset": "",
            "phone": "",
            "portable": "",
            "car": "",
            "default": ["", ""]
        },
        "on-click": "pavucontrol"
    },
    "tray": {
        "icon-size": 18,
        "spacing": 10
    },
    "custom/power": {
        "format": "",
        "tooltip": false,
        "on-click": "~/.config/hypr/scripts/powermenu.sh"
    },
	"custom/tlp": {
		"format": "{}",
		"exec": "~/.config/waybar/scripts/tlp-profile.sh",
		"return-type": "json",
		"interval": 5
	},
	"battery": {
		"states": {
			"warning": 30,
			"critical": 15
		},
		"format": "{capacity}%",
		"format-charging": "{capacity}%",
		"format-plugged": "{capacity}%",
		"format-alt": "{time} {icon}",
		"format-full": "{capacity}%",
		"format-icons": ["", "", "", "", ""]
	},
	"custom/pixelbuds": {
		"format": "{}",
		"return-type": "json",
		"exec": "~/.config/waybar/scripts/pixelbuds.sh",
		"interval": 5, // Check status every 30 seconds
		"on-click": "bluetoothctl disconnect B4:23:A2:09:D3:53" // Optional: opens Bluetooth manager on click
	},
	"custom/anc": {
		"format": "{}",
		"return-type": "json",
		"exec": "~/.config/waybar/scripts/anc_control.sh",
		"interval": 5, // Check status every 5 seconds
		"on-click": "~/.config/waybar/scripts/anc_control.sh off", // Left-click
		"on-click-right": "~/.config/waybar/scripts/anc_control.sh cycle" // Right-click
	}
}
