{
  "layer": "top",
  "position": "top",
  "exclusive": true,
  "modules-left": [
    "custom/arch",
    "hyprland/workspaces",
    "hyprland/language",
    "custom/nightlight",
    "mpris"
  ],
  "modules-center": [
    "hyprland/window"
  ],
  "modules-right": [
    "group/expand",
    "tray",
    "custom/airpods",
    "pulseaudio#source",
    "battery",
    "memory",
    "disk",
    "clock",

  ],
  "reload_style_on_change": true,

  "hyprland/window": {
      "format": "{class}  {title}",
      "icon": false,
      "max-length": 50,
      "separate-outputs": true,
      "tooltip": false
  },
  "hyprland/workspaces": {
      "format": "{icon}",
      "tooltip": false,
      "all-outputs": false,
      "sort-by-number": true,
      "disable-scroll": false,
      "on-scroll-up": "hyprctl dispatch workspace +1",
      "on-scroll-down": "hyprctl dispatch workspace -1",
      "active-only": false,
      "show-special": false,

  },
  "hyprland/language": {
    "format": "{}",
    "format-en": "EN",
    "format-ru": "RU",
    "format-uk": "UA",
    "format-de": "DE",
    "on-click": "hyprctl switchxkblayout current next"
},
  "custom/nightlight": {
    "exec": "~/.config/waybar/scripts/nightlight.sh",
    "return-type": "json",
    "signal": 8,
    "interval": 5,
    "format": "{}",
    "on-click": "~/.config/waybar/scripts/nightlight.sh toggle"
  },
  "tray": {
    "format": "{icon}",
    "tooltip": true,
    "icon-size": 18,
    "spacing": 0
  },
  "pulseaudio#source": {
    "format": "{icon} {volume}%",
    "format-muted": "󰝟",
    "tooltip": true,
    "tooltip-format": "Volume: {volume}%",
    "format-icons": {
      "headphone": "",
      "default": [
        "",
        "",
        ""
      ],
    },
    "scroll-step": 5,
    "on-click": "pavucontrol"
  },
     "battery": {
      	"interval": 60,
      	"states": {
       		"warning": 15,
       		"critical": 5
     	},
      	"events": {
       		"on-discharging-warning": "notify-send -u normal 'Low Battery'",
       		"on-discharging-critical": "notify-send -u critical 'Very Low Battery'",
       		"on-charging-100": "notify-send -u normal 'Battery Full!'",
       		"on-discharging": "notify-send -u normal 'Power Switch' Discharging",
       		"on-charging": "notify-send -u normal 'Power Switch' Charging'"
      	},
      	"format": "{icon} {capacity}%",
      	"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
      	"max-length": 25
     },
  "memory": {
    "format": "mem: {used:0.1f}G",
    "tooltip": true,
    "tooltip-format": "RAM: Used {used:0.1f}G / Free {total:0.1f}G",
    "interval": 4,
  },
    "mpris": {
    "format": "{player_icon} {status_icon} {artist} - {title}",
    "format-paused": "{player_icon} {status_icon} <i>{artist} - {title}</i>",
    "max-length": 35,
    "player-icons": {
      "default": "",
      "spotify": "",
      "firefox": "",
      "chromium": ""
    },
    "status-icons": {
      "playing": "⏸",
      "paused": "▶"
    },
    "on-click": "play-pause",
    "on-click-right": "next",
    "on-click-middle": "previous",
    "on-scroll-up": "playerctl volume 0.05+",
    "on-scroll-down": "playerctl volume 0.05-"
  },

  "disk": {
    "interval": 30,
    "unit": "GB",
    "format": "disk: {specific_used:0.2f}G",
    "path": "/",
    "tooltip": true,
    "tooltip-format": "Root: Used {specific_used:0.2f}G / free {specific_free:0.2f}G",
  },

  "clock": {
  	"format": "{:%H:%M}",
  	"format-alt": "{:%A, %B %d, %Y (%R)} 󰃰 ",
   	"tooltip-format": "<tt><small>{calendar}</small></tt>",
   	"calendar": {
   		"mode"             : "year",
   		"mode-mon-col"     : 3,
   		"weeks-pos"        : "right",
   		"first-day-of-week": 1,
   		"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>"
   		}
   	},
  },
  "custom/airpods": {
    "exec": "airpods-tui --waybar-watch",
    "return-type": "json",
    "format": " {}",
    "on-click": "kitty --class airpods-tui-float -e airpods-tui"
    },


  "custom/arch": {
    "format": "",
    "tooltip": false,
    "on-click": "pkill -x wofi || wofi --show drun"
  }
}
