{
    "layer": "top",
    "position": "top",
    "height": 36,
    "spacing": 2,
    "margin-top": 6,
    "margin-left": 10,
    "margin-right": 10,
    "modules-left": ["hyprland/workspaces", "hyprland/window"],
    "modules-center": ["clock"],
    "modules-right": ["custom/updates", "custom/keyhelp", "backlight", "pulseaudio", "bluetooth", "network", "cpu", "memory", "battery", "tray", "custom/power"],

    "custom/power": {
        "format": "󰐥",
        "tooltip-format": "Alimentation (SUPER+X)",
        "on-click": "fws-powermenu"
    },

    "custom/updates": {
        "exec": "fws-updates-check",
        "interval": 1800,
        "tooltip-format": "Mises à jour disponibles — clic pour installer",
        "on-click": "kitty -e fws-update"
    },

    "hyprland/workspaces": {
        "format": "{id}",
        "on-click": "activate",
        "on-scroll-up": "hyprctl dispatch workspace e-1",
        "on-scroll-down": "hyprctl dispatch workspace e+1"
    },
    "hyprland/window": {
        "max-length": 45,
        "separate-outputs": true
    },
    "clock": {
        "format": "󰥔 {:%H:%M    %A %d %B %Y}",
        "format-alt": "󰥔 {:%H:%M}",
        "tooltip-format": "<tt>{calendar}</tt>",
        "calendar": {
            "format": {
                "today": "<b><span color='#89b4fa'>{}</span></b>"
            }
        }
    },
    "custom/keyhelp": {
        "format": "󰌌 Raccourcis",
        "tooltip-format": "Raccourcis clavier (SUPER+K)",
        "on-click": "fws-keys"
    },
    "backlight": {
        "format": "{icon} {percent}%",
        "format-icons": ["󰃞", "󰃟", "󰃠"],
        "on-scroll-up": "brightnessctl set +5%",
        "on-scroll-down": "brightnessctl set 5%-",
        "tooltip-format": "Luminosité {percent}% (molette pour régler)"
    },
    "pulseaudio": {
        "format": "{icon} {volume}%",
        "format-muted": "󰝟 muet",
        "format-icons": { "default": ["󰕿", "󰖀", "󰕾"] },
        "on-click": "pavucontrol",
        "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
        "on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+",
        "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-",
        "tooltip-format": "{desc} — clic : mixeur, clic droit : muet"
    },
    "bluetooth": {
        "format": "󰂯",
        "format-disabled": "󰂲",
        "format-connected": "󰂱 {num_connections}",
        "format-no-controller": "",
        "on-click": "blueman-manager",
        "tooltip-format": "{controller_alias}\t{controller_address}",
        "tooltip-format-connected": "{device_enumerate}"
    },
    "network": {
        "format-wifi": "󰤨 {essid}",
        "format-ethernet": "󰈀 {ipaddr}",
        "format-disconnected": "󰤭 hors ligne",
        "tooltip-format": "{ifname} — {ipaddr}\n⇡ {bandwidthUpBytes}  ⇣ {bandwidthDownBytes}"
    },
    "cpu": {
        "format": " {usage}%",
        "interval": 3
    },
    "memory": {
        "format": " {percentage}%",
        "interval": 3,
        "tooltip-format": "{used:0.1f} / {total:0.1f} Gio"
    },
    "battery": {
        "states": { "warning": 25, "critical": 10 },
        "format": "{icon} {capacity}%",
        "format-charging": "󰂄 {capacity}%",
        "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󰁹"],
        "tooltip-format": "{timeTo}"
    },
    "tray": {
        "spacing": 8,
        "icon-size": 16
    }
}
