// -*- mode: jsonc -*-
// Scroll down - https://man.archlinux.org/man/waybar.5
{
  // "layer": "top", // Waybar at top layer
  // "position": "bottom", // Waybar position (top|bottom|left|right)
  "height": 30, // Waybar height (to be removed for auto height)
  // "width": 1280, // Waybar width
  "spacing": 4, // Gaps between modules (4px)
  // Choose the order of the modules
  "modules-left": [
    "niri/workspaces",
    "niri/mode",
    "niri/window"
  ],
  "modules-center": [
    "clock"
  ],
  "modules-right": [
    "network",
    "power-profiles-daemon",
    "wireplumber",
    "temperature",
    "battery",
    "tray"
  ],
  "niri/mode": {
    "format": "<span style=\"italic\">{}</span>"
  },
  "niri/scratchpad": {
    "format": "{icon} {count}",
    "show-empty": false,
    "format-icons": [
      "",
      ""
    ],
    "tooltip": true,
    "tooltip-format": "{app}: {title}"
  },
  "tray": {
    "icon-size": 22,
    "spacing": 10
    // "icons": {
    //   "blueman": "bluetooth",
    //   "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
    // }
  },
  "clock": {
    "timezone": "Europe/London",
    "format": "{:%R %A, %d %B}",
    "tooltip-format": "<tt><small>{calendar}</small></tt>",
    "calendar": {
      "mode": "year",
      "mode-mon-col": 3,
      "weeks-pos": "right",
      "on-scroll": 1,
      "on-click-right": "mode",
      "format": {
        "months": "<span color='#ffead3'><b>{}</b></span>",
        "days": "<span color='#ecc6d9'><b>{}</b></span>",
        "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
        "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
        "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
      }
    },
    "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"
    }
  },
  "temperature": {
    "critical-threshold": 80,
    "format": "{temperatureC}°C",
    "format-icons": [
      "",
      "",
      ""
    ]
  },
  "battery": {
    "states": {
      // "good": 95,
      "warning": 20,
      "critical": 15
    },
    "format": "{capacity}%",
    "format-full": "{capacity}%",
    "format-charging": "{capacity}% ",
    "format-plugged": "{capacity}% ",
    "format-alt": "{time} {icon}",
    "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": "wlan0",
    "format": "{ifname}",
    "format-wifi": "",
    "format-ethernet": "",
    "format-disconnected": "",
    "tooltip-format": "{ifname}",
    "tooltip-format-wifi": "{essid} ({signalStrength}%) ",
    "tooltip-format-ethernet": "{ifname} ",
    "tooltip-format-disconnected": "Disconnected",
    "max-length": 50
  },
  "wireplumber#sink": {
    "format": "{volume}% {icon}",
    "format-muted": "󰅶",
    "format-icons": [
      "",
      "",
      ""
    ],
    "on-click": "helvum",
    "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
    "scroll-step": 5
  },
  "wireplumber#source": {
    "node-type": "Audio/Source",
    "format": "{volume}% ",
    "format-muted": "",
    "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
    "scroll-step": 5
  }
}