// vim: set ft=jsonc:
{
    // "layer": "top", // Waybar at top layer
    "position": "top", // Waybar position (top|bottom|left|right)
    "height": 30, // Waybar height (to be removed for auto height)
    // "width": 1280, // Waybar width
    "spacing": 2, // Gaps between modules (4px)
    // Choose the order of the modules
    "modules-left": ["wlr/workspaces", "hyprland/submap", "hyprland/window"],
    // "modules-left": ["sway/workspaces", "sway/mode", "sway/window"],
    "modules-center": [],
    "modules-right": [
      "idle_inhibitor",
      "custom/sep",
      "custom/pipewire",
      "custom/sep",
      "network",
      "custom/sep",
      "cpu",
      "custom/sep",
      "memory",
      "custom/sep",
      "disk",
      "custom/sep",
      "temperature",
      "custom/sep",
      "backlight",
      "custom/sep",
      "battery",
      "custom/sep",
      "clock",
      "custom/sep",
      "tray"
    ],
    // Modules configuration
    "custom/sep": {
      "format": "|",
      "interval": "once",
      "tooltip": false
    },
    "sway/window": {
      "max-length": 40
    },
    "wlr/workspaces": {
      "format": "{name}",
      "on-click": "activate"
    },
    "custom/pipewire": {
      "exec": "/home/jay/bin/get-volume.sh",
      "interval": "once",
      "return-type": "json",
      "signal": 8,
      "format": "{icon} {percentage}%",
      "format-icons": {
        "mute": "",
        "default": ["", "", ""]
      },
      "on-click": "pavucontrol"
    },
    "sway/workspaces": {
        "disable-scroll": true,
        // "all-outputs": true,
        // "persistent_workspaces": {
        //   "1": [],
        //   "2": [],
        //   "3": [],
        //   "4": [],
        //   "5": [],
        //   "6": [],
        //   "7": [],
        //   "8": [],
        //   "9": [],
        //   "10": [],
        // },
        // "format": "{name}: {icon}",
        // "format-icons": {
        //     "1": "",
        //     "2": "",
        //     "3": "",
        //     "4": "",
        //     "5": "",
        //     "urgent": "",
        //     "focused": "",
        //     "default": ""
        // }
    },
    "sway/mode": {
        "format": "{}"
    },
    "sway/scratchpad": {
        "format": "{icon} {count}",
        "show-empty": false,
        "format-icons": ["", ""],
        "tooltip": true,
        "tooltip-format": "{app}: {title}"
    },
    "idle_inhibitor": {
        "format": "{icon}",
        "format-icons": {
            "activated": "",
            "deactivated": ""
        }
    },
    "tray": {
        // "icon-size": 21,
        "spacing": 10,
        "show-passive-items": true
    },
    "clock": {
        // "timezone": "America/New_York",
        "tooltip-format": "{:%Y %B}\n{calendar}",
        "format": "{:%Y-%m-%d %H:%M:%S}",
        "format-alt": "{:%Y-%m-%d}",
        "interval": 1
    },
    "cpu": {
        "format": " {usage}%({load})",
        "interval": 2,
        "tooltip": false
    },
    "memory": {
      "interval": 10,
      "format": " {used}G/{total}G",
      "tooltip-format": "{percentage}% used"
    },
    "temperature": {
        // "thermal-zone": 2,
        "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input",
        "critical-threshold": 80,
        // "format-critical": "{temperatureC}°C {icon}",
        "format": " {temperatureC}°C",
        "format-icons": ["", "", ""]
    },
    "backlight": {
        // "device": "acpi_video1",
        "format": "{icon} {percent}%",
        "format-icons": ["", "", "", "", "", "", "", "", ""]
    },
    "battery": {
        "states": {
            // "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{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": ["", "", "", "", ""]
    },
    "battery#bat2": {
        "bat": "BAT2"
    },
    "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}"
    },
    "disk": {
      "interval": 30,
      "path": "/",
      "format": " {used}/{total}"
    },
}