{
  "layer": "top",
  "output": "DP-1",
  "position": "top",
  "spacing": 4,
  "margin-top": 8,
  "margin-bottom": 0,
  "margin-left": 12,
  "margin-right": 12,

  "modules-left": [
    "hyprland/workspaces",
    "custom/spotify",
  ],

  "modules-center": [
    "clock"
  ],

  "modules-right": [
    "backlight",
    "pulseaudio",
    "network",
    "battery",
  ],
  
  "custom/icon": {
    "format": "󰣇",
    "on-click": "~/.config/rofi/bin/launcher",
    "tooltip": false 
  },

  "cpu": {
    "interval": 10,
    "format": " {usage}%",
    "max-length": 10,
    "tooltip": false
  },
  
  "clock": {
		"format": "<b>󰥔  {:%H:%M   󰃭  %d/%m}</b> ",
		//"format": "{:%a}",
		"tooltip-format": "<tt>{calendar}</tt>",
        "calendar": {
                    "mode"          : "month",
                    "format": {
                              "months":     "<span color='#cdd6f4'><b>{}</b></span>",
                              "days":       "<span color='#cdd6f4'><b>{}</b></span>",
                              "weeks":      "<span color='#cdd6f4'><b>W{}</b></span>",
                              "weekdays":   "<span color='#cdd6f4'><b>{}</b></span>",
                              "today":      "<span color='#f38ba8'><b>{}</b></span>"
                              }
                    },
    },

  "memory": {
    "interval": 30,
    "format": " {used}GiB",
    "format-alt": " {used:0.1f}G",
    "max-length": 10
  },

  "temperature": {
    "format": " {temperatureF}°F"
  },

  "hyprland/window": {
    "format": "  {}",
    "rewrite": {
      "(.*) - NVIM": "  NeoVim",
      "(.*) — Mozilla Firefox": "󰈹  Firefox",
      "  ": "󰇄  Desktop",
      "(.*) Spotify Free": "󰓇  Spotify",
      "(.*) Spotify": "󰓇  Spotify",
      "  ~": "  l6174@Radon",
      "(.*) - Obsidian(.*)": "󱓧  Obsidian",
    }
  },

    "hyprland/workspaces" : {
        "on-click": "activate",
        "active-only": false,
        "all-outputs": true,
        "format": "{icon}",
        "format-icons": {
			"urgent": "",
			"active": "",
			"default": ""
        },
        "persistent-workspaces": {
            "*": 4
        }       
    },
  
  "backlight": {
    "format": "{icon} <b>{percent}%</b>",
    "format-icons": ["󰃞", "󰃟", "󰃠"],
    "tooltip": false,
   },

  "pulseaudio": {
    "format": "{icon} <b>{volume}%</b>",
    "format-bluetooth": "{icon}  <b>{volume}%</b>",
    "format-bluetooth-muted": "󰝟 ",
    "format-muted": " 󰝟 ",
    "format-icons": {
      "headset": "",
      "default": ["󰕿", "󰖀", "󰕾"],
    },
    "tooltip": false,
    "on-click": "pavucontrol",
  },

  "network": {
    "interval": 30,
    "format-wifi": "󰤨   {essid}",
    "format-ethernet": "󰈀 Wired",
    "fomat-disconnected": "󱚵 Disconnected",
    "tooltip-format-wifi": "{essid} ({signalStrength}%)",
    "tooltip-format-ethernet": "{ifname} ",
    "tooltip-format-disconnected": "Disconnected",
  },
  "battery": {
    "states": {
      "warning": 30,
      "critical": 15
    },
    "format": "{icon} {capacity}%",
    "format-icons": ["󰂎", "󰁻", "󰁽", "󰁿", "󰂁", "󰁹"],
    "max-length": 25,
    "tooltip": false,
  },


  "tray": {
    "icon-size": 20,
    "spacing": 10,
  },

   "idle_inhibitor": {
    "format": "{icon}",
    "format-icons": {
        "activated": "󰈈 ",
        "deactivated": "󰈉 "
    },
  },

  "custom/separator-space": {
    "format": " ",
    "tooltip": false,
  },

  "custom/separator-gap": {
    "format": "  ",
    "tooltip": false,
  },

  "custom/separator-arrow": {
    "format": "  ",
    "tooltip": false,
  },

  "custom/spotify": {
        "format": "{} ",
        "max-length": 60,
        "interval": "once",
        "return-type": "json",
        "exec": "~/.local/bin/spotifyctl",
        "on-click": "playerctl --player=spotify play-pause && pkill -RTMIN+30 waybar",
        "on-click-right": "playerctl --player=spotify loop track",
        "on-scroll-down": "playerctl --player=spotify previous && pkill -RTMIN+30 waybar",
        "on-scroll-up": "playerctl --player=spotify next && pkill -RTMIN+30 waybar",
        "on-click-middle": "pkill --signal TERM spotify",
        "signal": 30,
        "smooth-scrolling-threshold": 1.0,
  },

  "custom/power": {
    "format": "󰐥",
    "on-click": "~/.config/rofi/bin/power.sh",
    "tooltip": false,
  },
  "custom/notification": {
    "tooltip": false,
    "format": "{icon}",
    "format-icons": {
      "notification": "󱅫 ",
      "none": "󰂚 ",
      "dnd-notification": "󰵙 ",
      "dnd-none": "󰂛 ",
      "inhibited-notification": "󱅫 ",
      "inhibited-none": "󰂚 ",
      "dnd-inhibited-notification": "󰵙 ",
      "dnd-inhibited-none": "󰂛​ "
    },
    "return-type": "json",
    "exec-if": "which swaync-client",
    "exec": "swaync-client -swb",
    "on-click": "swaync-client -t -sw",
    "on-click-right": "swaync-client -d -sw",
    "escape": true
  },

    "custom/updates": {
        "format": "  {}",
        "tooltip-format": "{}",
        "escape": true,
        "return-type": "json",
        "exec": "~/.config/waybar/custom-scripts/updates",
        "restart-interval": 60,
        "on-click": "kitty -e ~/.config/waybar/custom-scripts/update",
        "tooltip": false
    },

}
