// -*- mode: jsonc -*-
{
	"layer": "top",
	"position": "top",
	"spacing": 0,
	"margin-top": 0,
	"margin-left": 0,
	"margin-right": 0,
	"margin-bottom": 0,

	"modules-left": [
		"hyprland/window",
	  ],

	  "modules-center": [
	  ],

	  "modules-right": [
		  "hyprland/workspaces",
		  "battery",
		  "custom/pomodoro",
		  "clock",
		  "memory",
		  "backlight",
		  "pulseaudio",
		  "bluetooth",
		  "network",
		  "tray",
		  "custom/power",
	  ],

	  // Modules configuration
	  "hyprland/window": {
		  "icon": true,
		  "icon-size": 18,
		  "format": "{title}",
	  },

	  "hyprland/workspaces": {
		  "on-scroll-down": "hyprctl dispatch workspace e+1",
		  "on-scroll-up": "hyprctl dispatch workspace e-1",
		  "all-outputs": true,
		  "active-only": false,
		  "warp-onscroll": false,
		  "format": "",
	  },

	  "battery": {
		  "bat": "BAT0",
		  "interval": 5,
		  "format": "<span size='large'>{icon}</span>  {capacity}%",
		  "format-plugged": "<span size='large'>{icon}</span> {capacity}% (CHR)",
		  "tooltip-format": "({capacity}%) {timeTo}",
		  "states": {
			  "warning": 30,
			  "critical": 20,
		  },
		  "format-icons": {
			  "charging": "",
			  "default": [ "", "", "", "", "" ]
		  }
	  },

	  "clock": {
		  "interval": 1,
		  "format": "  {:%H : %M}",
		  "format-alt": "<span size='large'>󰃭</span> {:%a, %B %d, %Y}",
		  "tooltip-format": "<big>{:%Y %B}</big>\n<tt><big>{calendar}</big></tt>",
	  },

	  "custom/pomodoro": {
		  "format": "{}",
		  "return-type": "json",
		  "exec": "waybar-module-pomodoro --work-icon \" \" --break-icon \"\"",
		  "on-click": "waybar-module-pomodoro toggle",
		  "on-click-right": "waybar-module-pomodoro reset"
	  },

	  "memory": {
		  "interval": 30,
		  "format": "  {used:0.1f}G / {total:0.1f}G"
	  },

	  "backlight": {
		  "format": "<span size='medium'>{icon}</span> {percent}%",
		  "tooltip-format": "{icon} Brightness: {percent}%",
		  "format-icons": ["󰃚", "󰃛", "󰃜", "󰃝", "󰃞", "󰃟", "󰃠"]
	  },

	  "pulseaudio": {
		  "format": "<span size='large'>{icon}</span>  {volume}%",
		  "format-bluetooth": "<span size='large'>󰂰</span>  {volume}%",
		  "format-muted": "<span size='large'>󰝟</span>  M",
		  "format-icons": {
			  "default": ["󰕿", "󰖀", "󰕾"]
		  },
		  "on-click": "pavucontrol",
		  "on-click-right": "amixer set Master toggle",
		  "scroll-step": 4,
	  },

	  "bluetooth": {
		  "format": "󰂯 {status}",
		  "format-on": "<span size='large'>󰂯</span> ON",
		  "format-off": "<span size='large'>󰂲</span> OFF",
		  "format-disabled": "<span size='large'>󰂲</span> DA",
		  "format-connected": "<span size='large'>󰂱</span> ({device_battery_percentage}%)",
		  "tooltip-format": "({device_battery_percentage}%) {device_alias}",
		  "tooltip-format-on": "Bluetooth: ON",
		  "tooltip-format-disabled": "Bluetooth: DISABLED",
		  "on-click": "blueman-manager",
		  "on-click-right": "rfkill toggle bluetooth"
	  },

	  "network": {
		  "format-wifi": "{icon} {signalStrength}%",
		  "format-ethernet": "  {ipaddr}/{cidr}",
		  "format-disconnected": "󰤫  DC",
		  "format-disabled": "󰤮  DA",
		  "format-linked": "󰈁",
		  "tooltip-format-ethernet": "  {ifname}",
		  "tooltip-format-wifi": "{icon} {essid} ({signalStrength}%)",
		  "tooltip-format-disconnected": "󰤫  Disconnected",
		  "format-icons": [
			  "󰤯",
			  "󰤟",
			  "󰤢",
			  "󰤥",
			  "󰤨"
			],
			"on-click": "ghostty -e nmtui",
			"tooltip": true,
	  },

	  "tray": {
		  "icon-size": 14,
		  "spacing": 5
	  },

	  "custom/power": {
		  "format": "󰐥",
		  "tooltip": true,
		  "tooltip-format": "Power Menu",
		  "menu": "on-click",
		  "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
		  "menu-actions": {
			  "shutdown": "systemctl poweroff",
			  "reboot": "systemctl reboot",
		  }
	  },
}
