{
  // Shared defaults & core module definitions (laptop host)
  "layer": "bottom",
  "position": "bottom",
  "mod": "dock",
  "exclusive": true,
  "gtk-layer-shell": true,
  "passthrough": false,
  "fixed-center": true,
  "height": 32,
  "spacing": 8,

  // Hyprland
  "hyprland/workspaces": {
    "icon-size": 24,
    "spacing": 10,
    "all-outputs": true,
    "on-scroll-up": "hyprctl dispatch workspace r+1",
    "on-scroll-down": "hyprctl dispatch workspace r-1"
  },
  "hyprland/window": {
    "format": "{title}",
    "max-length": 56,
    "separate-outputs": false,
    "tooltip": true
  },

  // System stats
  "cpu":       { "interval": 5,  "format": " {usage}%",        "tooltip": true, "on-click": "alacritty -e btop" },
  "memory":    { "interval": 11, "format": " {percentage}%",   "tooltip": true, "on-click": "alacritty -e btop" },
  "custom/temps": {
    "exec-if": "command -v sensors >/dev/null",
    "exec": "bash -lc \"sensors | awk '/Tctl|Tdie|Package id 0/{gsub(/\\+|°C/,\\\"\\\"); print int($2); exit}'\"",
    "interval": 5,
    "format": " {output}°C",
    "tooltip": true,
    "on-click": "alacritty -e watch -n 1 sensors"
  },

  // Disks (keep minimal on laptop)
  "disk#root": {
    "interval": 29,
    "path": "/",
    "format": " {percentage_used}%",
    "tooltip": true,
    "tooltip-format": "Root: {used} / {total} ({percentage_used}%)"
  },

  // Media
  "mpris": {
    "format": "{player_icon} {dynamic}",
    "format-paused": "{status_icon} <i>{dynamic}</i>",
    "dynamic-len": 40,
    "ellipsis": "…",
    "player-icons": { "default": "▶", "mpv": "🎵", "spotify": "" },
    "status-icons": { "paused": "⏸" },
    "on-click": "playerctl play-pause",
    "on-click-right": "playerctl next",
    "on-click-middle": "playerctl previous",
    "on-scroll-up": "playerctl position 5+",
    "on-scroll-down": "playerctl position 5-",
    "tooltip": true
  },

  // Network / Audio / BT
  "network": {
    "format-wifi": " {essid} ({signalStrength}%)",
    "format-ethernet": " {ifname}",
    "format-disconnected": "󰌙 Disconnected",
    "tooltip": true,
    "tooltip-format": "{ifname} → {gwaddr}",
    "on-click": "nm-connection-editor",
    "on-click-right": "alacritty -e nmtui"
  },
  "pulseaudio": {
    "format": "{icon} {volume}%",
    "format-muted": " Muted",
    "scroll-step": 5,
    "interval": 30,
    "tooltip": true,
    "on-click": "pavucontrol",
    "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
    "format-icons": { "default": ["", ""] }
  },
  "bluetooth": {
    "format": " {status}",
    "format-connected": " {device_alias} ({device_battery_percentage}%)",
    "tooltip": true,
    "on-click": "blueman-manager"
  },

  // Backlight (screen)
  "backlight": {
    "interval": 2,
    "format": " {percent}%",
    "on-scroll-up": "brightnessctl set +5%",
    "on-scroll-down": "brightnessctl set 5%-",
    "tooltip": true
  },

  // Power
  "battery": {
    "states": { "good": 95, "warning": 30, "critical": 20 },
    "format": "{icon} {capacity}%",
    "format-alt": "{icon} {capacity}% ({time})",
    "format-charging": " {capacity}%",
    "format-full": " {capacity}%",
    "tooltip": true,
    "interval": 15,
    "format-icons": ["󰁺","󰁼","󰁿","󰂂","󰁹"]
  },
  "power-profiles-daemon": {
    "format": " {profile}",
    "tooltip": true,
    "on-click": "bash -lc 'cur=$(powerprofilesctl get); case $cur in performance) nxt=balanced;; balanced) nxt=powersave;; *) nxt=performance;; esac; powerprofilesctl set $nxt; notify-send -a waybar \"Power Profile\" \"Switched to $nxt\"'"
  },

  // Hyprsunset (reusing your existing script wiring & daemon)
  "custom/hyprsunset": {
    "exec-if": "[ -x $HOME/.config/waybar/scripts/hyprsunset_toggle.sh ]",
    "exec": "$HOME/.config/waybar/scripts/hyprsunset_toggle.sh --print",
    "return-type": "json",
    "interval": 60,
    "signal": 5,
    "format": "{text}",
    "tooltip": true,
    "on-click": "bash -lc '$HOME/.config/waybar/scripts/hyprsunset_toggle.sh --toggle-auto && pkill -SIGRTMIN+5 waybar'",
    "on-click-right": "bash -lc '$HOME/.config/waybar/scripts/hyprsunset_toggle.sh --toggle && pkill -SIGRTMIN+5 waybar'",
    "on-scroll-up": "bash -lc 't=$($HOME/.config/waybar/scripts/hyprsunset_toggle.sh --print | sed -n \"s/.* \\([0-9]\\+\\)K.*/\\1/p\"); [ -z \"$t\" ] && t=3800; t=$((t+200)); $HOME/.config/waybar/scripts/hyprsunset_toggle.sh --set $t && pkill -SIGRTMIN+5 waybar'",
    "on-scroll-down": "bash -lc 't=$($HOME/.config/waybar/scripts/hyprsunset_toggle.sh --print | sed -n \"s/.* \\([0-9]\\+\\)K.*/\\1/p\"); [ -z \"$t\" ] && t=3800; t=$((t-200)); [ $t -lt 1000 ] && t=1000; $HOME/.config/waybar/scripts/hyprsunset_toggle.sh --set $t && pkill -SIGRTMIN+5 waybar'"
  },

  // Extra laptop customs (defined by scripts below)
  "custom/wifi": {
    "exec-if": "command -v nmcli >/dev/null",
    "exec": "$HOME/.config/waybar/scripts/wifi_toggle.sh --print",
    "return-type": "json",
    "interval": 5,
    "signal": 10,
    "format": "{text}",
    "tooltip": true,
    "on-click": "bash -lc '$HOME/.config/waybar/scripts/wifi_toggle.sh --toggle && pkill -SIGRTMIN+10 waybar'"
  },
  "custom/bt": {
    "exec-if": "command -v bluetoothctl >/dev/null",
    "exec": "$HOME/.config/waybar/scripts/bt_toggle.sh --print",
    "return-type": "json",
    "interval": 5,
    "signal": 11,
    "format": "{text}",
    "tooltip": true,
    "on-click": "bash -lc '$HOME/.config/waybar/scripts/bt_toggle.sh --toggle && pkill -SIGRTMIN+11 waybar'"
  },
  "custom/airplane": {
    "exec-if": "command -v rfkill >/dev/null",
    "exec": "$HOME/.config/waybar/scripts/airplane_mode.sh --print",
    "return-type": "json",
    "interval": 7,
    "signal": 12,
    "format": "{text}",
    "tooltip": true,
    "on-click": "bash -lc '$HOME/.config/waybar/scripts/airplane_mode.sh --toggle && pkill -SIGRTMIN+12 waybar'"
  },
  "custom/kbdlight": {
    "exec-if": "command -v brightnessctl >/dev/null",
    "exec": "$HOME/.config/waybar/scripts/kbdlight.sh --print",
    "return-type": "json",
    "interval": 4,
    "signal": 13,
    "format": "{text}",
    "tooltip": true,
    "on-scroll-up": "bash -lc '$HOME/.config/waybar/scripts/kbdlight.sh --inc && pkill -SIGRTMIN+13 waybar'",
    "on-scroll-down": "bash -lc '$HOME/.config/waybar/scripts/kbdlight.sh --dec && pkill -SIGRTMIN+13 waybar'"
  },
  "custom/batteryhealth": {
    "exec-if": "command -v upower >/dev/null",
    "exec": "$HOME/.config/waybar/scripts/battery_health.sh",
    "return-type": "json",
    "interval": 120,
    "signal": 14,
    "format": "{text}",
    "tooltip": true
  },

  // Performance (same concept as desktop)
  "custom/performance": {
    "exec-if": "[ -x $HOME/.config/waybar/scripts/performance.sh ]",
    "exec": "$HOME/.config/waybar/scripts/performance.sh",
    "interval": 10,
    "signal": 6,
    "tooltip": true,
    "on-click": "bash -lc '$HOME/.config/waybar/scripts/performance.sh toggle >/dev/null 2>&1; pkill -SIGRTMIN+6 waybar'",
    "on-click-right": "bash -lc '$HOME/.config/waybar/scripts/performance.sh cycle >/dev/null 2>&1; pkill -SIGRTMIN+6 waybar'",
    "format": "{text}"
  },

  // Tray / Clock / Privacy
  "tray": { "icon-size": 18, "spacing": 4 },
  "clock": {
    "format": "{:%R | %d.%m.%Y}",
    "tooltip-format": "<tt><small>{calendar}</small></tt>",
    "calendar": { "mode": "year", "mode-mon-col": 3, "weeks-pos": "right" },
    "actions": { "on-click-right": "mode", "on-scroll-up": "shift_up", "on-scroll-down": "shift_down" }
  },
  "privacy": { "icon-size": 16, "tooltip": true }
}

