{
    "layer": "top", // Waybar at top layer, don't change!
    "position": "top", // Waybar position (top|bottom|left|right)
    // "width": 1880,
    "modules-left": ["custom/fedora", "custom/updates", "tray", "custom/apps"],
    "modules-center": ["hyprland/workspaces", "custom/music"],
    "modules-right": ["custom/weather", "pulseaudio", "backlight", "network", "battery", "clock", "custom/notification", "custom/power"],
    "hyprland/workspaces": {
         "disable-scroll": false,
         "sort-by-name": true,
         "format": " {icon} ",
         "format-icons": {
             "default": "󰃚",
         },
     },
    "tray": {
        "icon-size": 21,
        "spacing": 10
    },
    "custom/music": {
        "format": " {}",
        "escape": true,
        "interval": 1,
        "tooltip": false,
        "exec": "playerctl metadata --format='{{ artist }} - {{ title }} | {{ duration(mpris:length - position) }}'",
        "on-click": "playerctl play-pause",
        "on-scroll-up": "playerctl previous",
        "on-scroll-down": "playerctl next",
        "smooth-scrolling-threshold": 1,
        "max-length": 75
    },
    "clock": {
        "timezone": "America/New_York",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "interval": 1,
        "format-alt": " {:%d/%m/%Y}",
        "format": " {:%H:%M:%S}"
    },
    "backlight": {
        "device": "intel_backlight",
        "format": "{icon}",
        "format-icons": ["", "", "", "", "", "", "", "", ""]
    },
    "network": {
        "format": "{ifname}",
        "format-wifi": "   {signalStrength}%",
        "format-ethernet": "  {ipaddr}",
        "format-disconnected": "Not connected", //An empty format will hide the module.
        "tooltip-format": "󰀂 {ifname} via {gwaddri}",
        "tooltip-format-wifi": "   {essid} ({signalStrength}%)",
        "tooltip-format-ethernet": "  {ifname} ({ipaddr}/{cidr})",
        "tooltip-format-disconnected": "Disconnected",
        "max-length": 50,
        "on-click": "wezterm start nm-connection-editor"
    },
    "battery": {
        "states": {
            "warning": 30,
            "critical": 15
        },
        "format": "{capacity}% {icon}",
        "format-charging": "{capacity}% 󰂄",
        "format-plugged": "󰂄",
        "format-icons": ["󰂎",  "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
    },
    "pulseaudio": {
        // "scroll-step": 1, // %, can be a float
        "format": "{icon} {volume}%",
        "format-muted": "",
        "format-icons": {
            "default": ["", "", " "]
        },
        "on-click": "amixer set Master toggle"
    },
    "custom/power": {
        "tooltip": false,
        "on-click": "wlogout",
        "format": ""
    },
    "custom/fedora": {
    	"format": "",
    	"tooltip-format": "{}",
    	"exec": "bash ~/.config/waybar/scripts/os.sh",
    	"on-click": "wezterm"
    },
    "custom/updates": {
	"exec": "bash ~/.config/waybar/scripts/checkupdates.sh", // <--- path to script
	"on-click": "bash ~/.config/waybar/scripts/checkupdates.sh", // refresh on click
	"on-click-right": "wezterm start sudo dnf update -y", // update on right click
	"interval": 900, // refresh every 15 minutes
	"return-type": "json",
	"format": "{icon}",
	"format-alt": "{icon} {}",
	"format-icons": {
            "has-updates": "", // icon when updates needed
            "updated": "", // icon when all packages updated
        }
    },
    "custom/weather": {
	"exec": "python ~/.config/waybar/scripts/weather.py",
	"restart-interval": 300,
	"return-type": "json",
	"on-click": "xdg-open https://weather.com/en-IN/weather/today/l/13066"
	// "format-alt": "{alt}",
    },
    "custom/apps": {
    	"format": "Apps",
    	"tooltip-format": "Right click for keybind list",
    	"on-click": "rofi -show drun",
    	"on-click-right": "wezterm start fish ~/.config/waybar/scripts/keybinds.sh",
    },
    "custom/notification": {
        "tooltip": false,
        "format": "{icon}",
        "format-icons": {
            "notification": "<span foreground='red'></span>",
            "none": "",
            "dnd-notification": "<span foreground='red'></span>",
            "dnd-none": "",
            "inhibited-notification": "<span foreground='red'></span>",
            "inhibited-none": "",
            "dnd-inhibited-notification": "<span foreground='red'>/span>",
            "dnd-inhibited-none": ""
        },
        "return-type": "json",
        "exec-if": "which swaync-client",
        "exec": "swaync-client -swb",
        "on-click": "swaync-client -t -sw",
        "escape": true
    },
}
