{
    // "layer": "top", // Waybar at top layer
    // "position": "bottom", // Waybar position (top|bottom|left|right)
    "height": 32, // 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": ["hyprland/workspaces"],
  
    "hyprland/workspaces": {
      "format": "{icon}",
        "format-icons": {
            "urgent": "",
            //"active": "",
            "active": "",
            "default": ""
      }
    },
  
    // ------------------------------------------------------------------------ //
  
    "modules-center": [ "custom/weather", "clock" ],
  
    "custom/weather": {
      "format": "{icon} {percentage}℃",
      "format-icons": {
        "sunny": "󰖙",
        "partlycloudy": "󰖕",
        "cloudy": "󰖐",
        "verycloudy": "󰼯",
        "fog": "󰖑",
        "lightrain": "󰖗",
        "heavyrain": "󰖖",
        "hail": "󰖒",
        "thunder": "󰖓",
        "lightsnow": "󰖘",
        "heavysnow": "󰼶",
        "snowrain": "󰙿"
      },
      "exec": "$HOME/.config/waybar/modules/weather.sh",
      "interval": 600,
      "return-type": "json",
      "tooltip": true,
      "on-click": "swx -t env REPORT=1 $HOME/.config/waybar/modules/weather.sh"
    },
  
    "custom/hotspots": {
      "format": "{}",
      "exec": "$HOME/.config/waybar/modules/hotspots.sh",
      "on-click": "$HOME/.config/waybar/modules/hotspots.sh click",
      "escape": true,
      "interval": 600,
      "return-type": "json"
    },
  
    // ------------------------------------------------------------------------ //
    "modules-right": ["tray", "cpu", "memory", "disk#root", "disk#home", "temperature", "idle_inhibitor", "backlight", "wireplumber", "custom/vpn", "network#tailscale", "network", "battery", "clock"],
  
    "tray": {
      "icon-size": 15,
      "spacing": 5
    },
    
    "disk#root": {
      "path": "/",
      "format": "󰋊 <small>/ </small>{percentage_used}%"
    },
  
    "disk#home": {
      "path": "/home",
      "format": "<small>/home </small>{percentage_used}%"
    },
  
    "cpu": {
      "format": "{icon} {usage}%",
      "format-icons": ["󰊚", "󰀦"],
      "on-click": "$HOME/bin/swx -t -- btop"
    },
  
    "memory": {
      "format": "{icon} {percentage}%",
      "format-icons": ["󰘚", "󰀦"], // 󰍛
      "on-click": "$HOME/bin/swx -t -- btop"
    },
  
    "temperature": {
      "critical-threshold": 100,
      "format": "{icon} {temperatureC}℃",
      "format-icons": ["󱃃", "󰔏", "󰸁", "󱜜"]
    },
  
    "idle_inhibitor": {
      "format": "{icon}",
      "format-icons": {
        "activated": "󰅶",
        "deactivated": "󰾪"
      }
    },
  
    "backlight": {
      "device": "auto",
      "format": "{icon}",
      "format-icons": ["󰹐", "󰌶", "󰛩", "󰖧"],
      "on-scroll-down": "light -A 5",
      "on-scroll-up": "light -U 5",
      // save current level
      // then set to minimum brightness
      "on-click-right": "light -O; light -S $(light -P)",
      // revert to previously saved brightness
      "on-click-middle": "light -I"
    },
  
    "custom/gamma": {
      "format": "{icon}",
      "format-icons": {
        "dawn": "󰱌",
        "day": "󰱌",
        "dusk": "󰱊",
        "night": "󰱊",
      },
      "exec": "env GAMMA_COMMAND='wlsunset -l $HOME_LAT -L $HOME_LON -p' YAEGI_SYSCALL=1 YAEGI_UNRESTRICTED=1 ${HOME}/.config/waybar/modules/gamma.go",
      "return-type": "json"
    },
  
    "wireblumper": {
      "format": "{icon} {volume}%",
      "format-bluetooth": "{icon}󰂯 {volume}%",
      "format-muted": "󰝟 {volume}%",
      "format-icons": {
        "easyeffects_sink": "󰺢",
        "headphones": "󰋋",
        "handsfree": "󰜟",
        "headset": "󰋎",
        "phone": "󰏲",
        "portable": "󰛵",
        "car": "󰄋",
        "default": ["󰕿", "󰖀", "󰕾"]
      },
    },
  
    "custom/vpn": {
      "exec": "${HOME}/.config/waybar/modules/vpn.sh",
      "interval": 600,
      "return-type": "json",
      "on-click": "${HOME}/.config/waybar/modules/vpn.sh toggle",
    },
  
    "network#tailscale": {
      "interface": "tailscale0",
      "format": "󰌆",
      "format-disconnected": "󰌊",
      "tooltip-format": "{ifname}: {bandwidthUpBits} {bandwidthDownBits}",
      "tooltip-format-disconnected": "disconnected",
      "on-click": "${HOME}/.config/waybar/modules/tailscale.sh toggle",
    },
  
    "network": {
      "format-wifi": "{icon} {signalStrength}%",
      "format-icons": ["󰤫", "󰤟", "󰤢", "󰤥", "󰤨"],
      "format-ethernet": "󰌗",
      "format-linked": "󰈀 {ifname}",
      "format-disconnected": "󰌙 ",
      "tooltip-format": "{ifname}: {ipaddr}/{cidr}\ngateway: {gwaddr}\nssid: {essid}\nsignal: {signaldBm} dbm\ndown: {bandwidthDownBits}\nup: {bandwidthUpBits}",
      "tooltip-format-disconnected": "disconnected",
      // cycles through wifi/ethernet/off
      // "on-click": "${HOME}/.config/waybar/modules/network.sh toggle",
    },
  
    "battery": {
      "states": {
        "good": 90,
        "warning": 30,
        "critical": 15
      },
      "format": "{icon} {capacity}%",
      "format-charging": "󰗱 {capacity}%",
      "format-full-charging": "󱊦",
      "format-icons": ["󱃍", "󱊡", "󱊢", "󱊣"]
    },
    "clock": {
      "format": " {:%H:%M}",
        "format-alt":" {:%Y-%m-%d  %H:%M (%Z)}",
        // "tooltip-format": "{tz_list}\n<tt><small>{calendar}</small></tt>",
        "timezones": [ "Canada/Eastern","Etc/UTC"],
        "calendar": {
          "mode":"year",
          "mode-mon-col": 3,
          "weeks-pos":"left",
          "on-scroll":1,
          "format": {
            "months":     "<span font='JetBrains Mono Nerd Font Mono' color='#ffead3'><b>{}</b></span>",
            "days":       "<span font='JetBrains Mono Nerd Font Mono' color='#ecc6d9'><b>{}</b></span>",
            "weeks":      "<span font='JetBrains Mono Nerd Font Mono' color='#99ffdd'><b>W{}</b></span>",
            "weekdays":   "<span font='JetBrains Mono Nerd Font Mono' color='#ffcc66'><b>{}</b></span>",
            "today":      "<span font='JetBrains Mono Nerd Font Mono' 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"
          }
    },
  }
  
