{
    "layer": "top", // Waybar at top layer
    // "position": "bottom", // Waybar position (top|bottom|left|right)
    "height": 30, // Waybar height (to be removed for auto height)
    // "width": 1280, // Waybar width
    // "gtk-layer-shell": "false",
    // Choose the order of the modules
    "modules-left": ["sway/workspaces", "sway/mode", "tray"],
    "modules-center": ["sway/window"],
    "modules-right": ["custom/zypper", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "pulseaudio", "custom/layout", "clock#date", "clock"],
    "sway/mode": {
        "format": " {}"
    },
    "sway/workspaces": {
        "all-outputs": false,
        "disable-scroll": true,
        "format": " {icon} ",
        "format-icons": {
            "urgent": "",
            "focused": "",
            "default": ""
        }
    },
    "sway/window": {
        "max-length": 80,
        "tooltip": false
    },
    "custom/layout": {
        "tooltip": false,
        "exec": "swaymsg -mrt subscribe '[\"input\"]' | jq -r --unbuffered \"select(.change == \\\"xkb_layout\\\") | .input | select(.type == \\\"keyboard\\\") | .xkb_active_layout_name | .[0:2]\""
    },
    "custom/zypper": {
        "format": "{} ",
        "interval": 3600,
        "exec": "zypper lu | grep 'v |' | wc -l; echo 'packages to update'",
        "exec-if": "exit 0",
        "on-click": "exec alacritty -e sudo sh -c 'zypper ref; zypper dup; pkill -SIGRTMIN+8 waybar'",
        "signal": 8
    },
    // Modules configuration
    //  "sway/workspaces": {
    //     "disable-scroll": true,
    //     "all-outputs": true,
    //     "format": "{name}: {icon}",
    //     "format-icons": {
    //         "1": "",
    //         "2": "",
    //         "3": "",
    //         "4": "",
    //         "5": "",
    //         "urgent": "",
    //         "focused": "",
    //         "default": ""
    //     }
    // },
    "idle_inhibitor": {
        "format": "{icon}",
        "format-icons": {
            "activated": "",
            "deactivated": ""
        } 
    },
    "tray": {
        // "icon-size": 21,
        "spacing": 10
    },
    "clock": {
        "format": "{:%H:%M}",
        "tooltip": false
    },
    "clock#date": {
        "format": "{:%a %d %b w:%V}",
        "tooltip": false
    },
    "cpu": {
        "format": "{usage}% ",
        "tooltip": false
    },
    "memory": {
        "format": "{}% "
    },
    "temperature": {
        // "thermal-zone": 2,
        // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
        "critical-threshold": 80,
        // "format-critical": "{temperatureC}°C {icon}",
        "format": "{temperatureC}°C {icon}",
        "format-icons": ["", "", ""]
    },
    "backlight": {
        // "device": "acpi_video1",
        "format": "{percent}% {icon}",
        "format-icons": ["", ""]
    },
    "battery": {
        "states": {
            // "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{icon}",
        "format-charging": "",
        "format-plugged": "",
        "format-alt": "{capacity}% {time}",
        "format-icons": ["", "", "", "", ""]
    },
    "battery#bat2": {
        "bat": "BAT2"
    },
    "network": {
        // "interface": "wlp2*", // (Optional) To force the use of this interface
        "format-wifi": "",
        "format-ethernet": "",
        "format-linked": "",
        "format-disconnected": "⚠",
        "format-alt": "{ifname} {essid} ({signalStrength}%)"
    },
    "pulseaudio": {
        "format": "{icon}",
        "format-alt": "{volume} {icon}",
        "format-alt-click": "click-right",
        "format-muted": "",
        "format-icons": {
            "headphones": "",
            "handsfree": "",
            "headset": "",
            "phone": "",
            "portable": "",
            "car": "",
            "default": ["", "", ""]
        },
        "scroll-step": 10,
        "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
        "on-click-right": "pavucontrol",
        "tooltip": false
    }
}
