{
  "name": "power",
  "kind": "bundled",
  "title": "Battery \u0026 Power",
  "description": "Battery level and time left, and with the optional power watcher, where the power goes: the draw over the last hours, what uses power now and why, and what used the battery today, this week and ever.",
  "version": "0.1.0",
  "icon": {
    "tile": {
      "glyph": "󰁹",
      "bg": "green"
    }
  },
  "author": "pal",
  "spec": "github:zcag/pal/extensions/power@v0.9.1",
  "source": "https://github.com/zcag/pal/tree/HEAD/extensions/power",
  "commit": "63287e180ce349dac3aa87c68ce4c80bc42ad409",
  "manifest": {
    "name": "power",
    "title": "Battery \u0026 Power",
    "description": "Battery level and time left, and with the optional power watcher, where the power goes: the draw over the last hours, what uses power now and why, and what used the battery today, this week and ever.",
    "version": "0.1.0",
    "icon": {
      "tile": {
        "glyph": "󰁹",
        "bg": "green"
      }
    },
    "author": "pal",
    "repo": "bundled",
    "license": "MIT",
    "settings": [
      {
        "kind": "path",
        "id": "power_state_file",
        "label": "Power watcher state",
        "description": "Optional state.json written by the `power` watcher. It adds measured draw, warnings and top consumers; a stale file is ignored.",
        "pick": "file",
        "default": "~/.local/share/power/state.json"
      }
    ],
    "store": {
      "tagline": "Battery level, and exactly what is draining it",
      "category": "system",
      "features": [
        "The level, the power source and the time left in one sentence (`Drawing 12 W · 1 h 48 min left`)",
        "With the `power` watcher: six hours of draw as a chart, with charging stretches and the charge level over it",
        "What uses power now: the split between apps, chip and screen, and each process with its watts and why",
        "What used the battery today, over 7 days and all time, in watt-hours and as a share",
        "Battery health, cycle count and temperature at a glance",
        "A bar item that stays hidden while all is well and shows up for a low battery or a heavy draw"
      ],
      "permissions": [],
      "platforms": [
        "macos",
        "linux"
      ],
      "screenshots": [
        {
          "file": "1-now.png",
          "caption": "Now: the level and six hours of draw on the left; the warning, where the watts go and what uses them on the right"
        },
        {
          "file": "2-today.png",
          "caption": "Today: what used the battery in watt-hours with each one's share, the screen and the rest explained"
        },
        {
          "file": "3-week.png",
          "caption": "7 days: where the week's watt-hours went, the costliest process under the cursor a key away from Processes"
        },
        {
          "file": "bar-menubar.png",
          "caption": "On the menu bar: the level, the draw and the warning that made it surface",
          "kind": "bar"
        },
        {
          "file": "bar-popover.png",
          "caption": "Hover opens the popover: the level, the last hour's draw, the warning and what uses power now",
          "kind": "bar",
          "box": [
            254,
            64,
            840,
            946
          ]
        },
        {
          "file": "bar-sketchybar.png",
          "caption": "On sketchybar: the level, draw and warning as one strip",
          "kind": "bar"
        }
      ],
      "actions": [
        {
          "title": "Find in Processes",
          "description": "The process under the cursor, typed into the Processes palette (to quit it from there).",
          "keys": "enter"
        },
        {
          "title": "Next / previous tab",
          "description": "Now, Today, 7 days, All time; also 1 to 4.",
          "keys": "tab"
        },
        {
          "title": "Copy name",
          "keys": "cmd+c"
        },
        {
          "title": "Open Battery settings",
          "keys": "s"
        },
        {
          "title": "Refresh",
          "description": "Re-reads the watcher and its windows now.",
          "keys": "cmd+r"
        }
      ]
    },
    "palettes": {
      "power": {
        "title": "Battery \u0026 Power",
        "kind": "view",
        "description": "The level, six hours of draw and the battery's health on the left; on the right, tabs for what uses power now and what used the battery today, this week and ever.",
        "keys": [
          {
            "keys": "enter",
            "title": "Find the process in Processes (on a bookkeeping line: Battery settings)"
          },
          {
            "keys": "tab",
            "title": "Next tab (shift+tab, left, right, h, l; 1 to 4 pick one)"
          },
          {
            "keys": "down",
            "title": "Next row (up, j, k)"
          },
          {
            "keys": "cmd+c",
            "title": "Copy the name"
          },
          {
            "keys": "s",
            "title": "Open Battery settings"
          },
          {
            "keys": "cmd+r",
            "title": "Refresh"
          }
        ]
      }
    },
    "states": {
      "level": {
        "description": "Charge, percent",
        "kind": "number"
      },
      "charging": {
        "description": "On external power",
        "kind": "boolean"
      },
      "draw": {
        "description": "Measured draw in watts from the power watcher; 0 without it",
        "kind": "number"
      },
      "alert": {
        "description": "The power watcher's worst warning: crit, warn, or nothing",
        "kind": "string"
      }
    },
    "bar": {
      "battery": {
        "title": "Battery",
        "description": "Battery level, and the time left once that is the question being asked. Hidden while healthy by its rules: on battery from 50%, on the charger from 20%, unless the power watcher warns or measures a draw of 15 W. Amber at 20%, red at 10% or on a critical warning. Hover shows the popover (the level, the last hour's draw, the warning, what uses power now, today's watt-hours); a click opens the Battery \u0026 Power palette.",
        "refresh": {
          "every": 30,
          "on": [
            "wake"
          ]
        },
        "mocks": {
          "healthy": {
            "title": "Healthy, hidden",
            "item": {
              "hidden": true,
              "empty": {
                "icon": "󰂄",
                "title": "100%",
                "tooltip": "Power Adapter · Charged"
              }
            }
          },
          "draining": {
            "title": "Getting low, the time left beside it",
            "item": {
              "icon": "󰁻",
              "title": "24% · 2:57",
              "tooltip": "Battery Power · Discharging · 2:57 remaining · 7.2 W draw"
            }
          },
          "shown": {
            "title": "Below the show threshold, nothing wrong",
            "item": {
              "icon": "󰁿",
              "title": "42%",
              "tooltip": "Battery Power · Discharging · 3:40 remaining · 6.1 W draw"
            }
          },
          "charging": {
            "title": "Charging",
            "item": {
              "icon": "󰂄",
              "title": "14%",
              "tooltip": "Power Adapter · Charging · 48m remaining"
            }
          },
          "warning": {
            "title": "Power warning",
            "item": {
              "icon": "󰁿",
              "title": "42% · 18.9W · background-burn",
              "color": "amber",
              "tooltip": "Battery Power · Discharging · 1:12 remaining · 18.9 W draw · copilot is using power in the background"
            }
          },
          "critical": {
            "title": "Critical battery",
            "item": {
              "icon": "󰁺",
              "title": "8% · 0:22",
              "color": "red",
              "tooltip": "Battery Power · Discharging · 0:22 remaining"
            }
          }
        },
        "keys": [
          {
            "keys": "enter",
            "title": "Open Battery \u0026 Power"
          },
          {
            "keys": "s",
            "title": "Open Battery settings"
          }
        ],
        "rules": [
          {
            "id": "fine",
            "when": "not power.charging and power.level \u003e= 50 and not power.alert and power.draw \u003c 15",
            "description": "On battery with plenty left and nothing wrong: nothing to say.",
            "hidden": true
          },
          {
            "id": "plugged",
            "when": "power.charging and power.level \u003e 20 and not power.alert",
            "description": "On the charger past the low mark: nothing to say.",
            "hidden": true
          },
          {
            "id": "low",
            "when": "not power.charging and power.level \u003c= 20",
            "description": "Getting low on battery.",
            "color": "amber"
          },
          {
            "id": "warn",
            "when": "power.alert == 'warn'",
            "description": "The power watcher has a warning (a background burn, a high draw).",
            "color": "amber"
          },
          {
            "id": "critical",
            "when": "not power.charging and power.level \u003c= 10",
            "description": "Nearly out.",
            "color": "red"
          },
          {
            "id": "crit",
            "when": "power.alert == 'crit'",
            "description": "The power watcher's critical warning.",
            "color": "red"
          }
        ]
      }
    }
  },
  "playable": false,
  "updated_at": "2026-09-30T01:45:08Z",
  "url": "https://pal.cagdas.io/extensions/power",
  "tagline": "Battery level, and exactly what is draining it",
  "category": "system",
  "screenshots": [
    "https://pal.cagdas.io/extensions/power/screenshots/1-now-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/1-now.png",
    "https://pal.cagdas.io/extensions/power/screenshots/2-today-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/2-today.png",
    "https://pal.cagdas.io/extensions/power/screenshots/3-week-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/3-week.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-menubar-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-menubar.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-popover-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-popover.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-sketchybar-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-sketchybar.png"
  ],
  "panel_screenshots": [
    "https://pal.cagdas.io/extensions/power/screenshots/1-now.png",
    "https://pal.cagdas.io/extensions/power/screenshots/2-today.png",
    "https://pal.cagdas.io/extensions/power/screenshots/3-week.png"
  ],
  "bar_screenshots": [
    "https://pal.cagdas.io/extensions/power/screenshots/bar-menubar.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-popover.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-sketchybar.png"
  ],
  "panel_screenshots_dark": [
    "https://pal.cagdas.io/extensions/power/screenshots/1-now-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/2-today-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/3-week-dark.png"
  ],
  "bar_screenshots_dark": [
    "https://pal.cagdas.io/extensions/power/screenshots/bar-menubar-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-popover-dark.png",
    "https://pal.cagdas.io/extensions/power/screenshots/bar-sketchybar-dark.png"
  ],
  "has_bar": true,
  "bar_items": [
    {
      "id": "battery",
      "title": "Battery",
      "description": "Battery level, and the time left once that is the question being asked. Hidden while healthy by its rules: on battery from 50%, on the charger from 20%, unless the power watcher warns or measures a draw of 15 W. Amber at 20%, red at 10% or on a critical warning. Hover shows the popover (the level, the last hour's draw, the warning, what uses power now, today's watt-hours); a click opens the Battery \u0026 Power palette.",
      "refresh": {
        "every": 30,
        "on": [
          "wake"
        ]
      },
      "refresh_words": "every 30s, on wake"
    }
  ],
  "has_links": false,
  "links": [],
  "multi": false,
  "has_readme": true
}
