{
  "name": "system",
  "kind": "bundled",
  "title": "System",
  "description": "System commands from the keyboard: sleep, lock, restart, shut down, empty the trash, dark mode, volume, brightness, eject, quit every app, clear notifications. Keep the computer awake for a while, until a time or while an app runs, with a countdown on the bar.",
  "version": "0.1.0",
  "icon": {
    "tile": {
      "glyph": "󰐥",
      "bg": "slate"
    }
  },
  "author": "pal",
  "spec": "github:zcag/pal/extensions/system@v0.17.4",
  "source": "https://github.com/zcag/pal-extensions/tree/HEAD/system",
  "commit": "4d2559cf9c04d0133c97d7c897f19a14acb9eace",
  "manifest": {
    "name": "system",
    "title": "System",
    "description": "System commands from the keyboard: sleep, lock, restart, shut down, empty the trash, dark mode, volume, brightness, eject, quit every app, clear notifications. Keep the computer awake for a while, until a time or while an app runs, with a countdown on the bar.",
    "version": "0.1.0",
    "icon": {
      "tile": {
        "glyph": "󰐥",
        "bg": "slate"
      }
    },
    "author": "pal",
    "repo": "bundled",
    "license": "MIT",
    "settings": [
      {
        "kind": "boolean",
        "id": "confirm_destructive",
        "label": "Ask first",
        "text": "Confirm before logging out, restarting, shutting down, emptying the trash or quitting every app",
        "default": true,
        "description": "Log Out, Restart, Shut Down, Empty Trash and Quit All Apps show a confirmation first; off runs them at once."
      },
      {
        "kind": "text",
        "id": "awake_default",
        "label": "Keep awake for",
        "placeholder": "1h",
        "default": "1h",
        "description": "What a bare Keep Awake runs for: 45m, 2h, 1h30m, a clock time like 14:30, or forever."
      },
      {
        "kind": "boolean",
        "id": "awake_display",
        "label": "Display",
        "text": "Keep the display awake too",
        "default": true,
        "description": "On: neither the machine nor the display sleeps (caffeinate -d -i). Off: the display may sleep while the machine stays up, for a download or a build. The row's Display field and the popover's switch override it per run."
      }
    ],
    "store": {
      "tagline": "Sleep, lock, restart, dark mode, volume, keep awake",
      "category": "system",
      "features": [
        "Type `mute`, `sleep` or `power off` at the root to find the command",
        "Only what this machine can do is listed; Empty Trash shows how much is in it, Dark Mode the current look",
        "Keep Awake for `45m`, `2h`, until `14:30` or while an app runs; the bar counts down, and it ends on time even if pal quits",
        "Quit All Apps asks each app the usual way, so unsaved work still prompts; Unhide All Apps and Dismiss Notifications too",
        "Log Out, Restart, Shut Down and Empty Trash ask first (a setting)",
        "Quick Look on what is selected in Finder (macOS)"
      ],
      "permissions": [
        "automation",
        "full-disk-access"
      ],
      "platforms": [
        "macos",
        "linux"
      ],
      "screenshots": [
        {
          "file": "1-list.png",
          "caption": "The commands this machine can run; the appearance and the Trash count on the right"
        },
        {
          "file": "2-root.png",
          "caption": "caffeinate at the root finds Keep Awake: the rows are indexed with their keywords"
        },
        {
          "file": "3-confirm.png",
          "caption": "A destructive command asks first"
        },
        {
          "file": "4-apps.png",
          "caption": "Quit All Apps (asks first), Unhide All Apps, Dismiss Notifications, and Quick Look on what is marked in Finder"
        },
        {
          "file": "bar-menubar.png",
          "caption": "On the menu bar: a coffee and what is left of the run",
          "kind": "bar"
        },
        {
          "file": "bar-menubar-display.png",
          "caption": "The display kept awake too: a monitor mark after the countdown",
          "kind": "bar"
        },
        {
          "file": "bar-popover.png",
          "caption": "A click opens the popover: the run on a card with the time left and a bar, the presets on the digits, the display switch, Enter allows sleep",
          "kind": "bar",
          "box": [
            420,
            64,
            840,
            644
          ]
        },
        {
          "file": "bar-popover-forever.png",
          "caption": "Until turned off: ∞ on the strip and the card; a preset gives it an end",
          "kind": "bar",
          "box": [
            430,
            64,
            840,
            628
          ]
        },
        {
          "file": "bar-popover-field.png",
          "caption": "u opens the field: 45m, 14:30 or forever, then Enter",
          "kind": "bar",
          "box": [
            420,
            64,
            840,
            690
          ]
        },
        {
          "file": "bar-sketchybar.png",
          "caption": "On sketchybar: the coffee and the countdown as the label",
          "kind": "bar"
        }
      ],
      "actions": [
        {
          "title": "Run",
          "description": "The command; Log Out, Restart, Shut Down, Empty Trash and Quit All Apps ask first.",
          "keys": "enter"
        },
        {
          "title": "Keep awake",
          "description": "On Keep Awake: for what the bar's field says, else the default; cmd+enter until turned off; cmd+u the form (a time, an app to follow, the display).",
          "keys": "enter"
        },
        {
          "title": "Allow sleep",
          "description": "On the row while a run is on; cmd+d flips whether the display is kept awake too.",
          "keys": "enter"
        }
      ]
    },
    "links": {
      "run": {
        "description": "Run a system command",
        "confirm": true,
        "params": {
          "id": {
            "description": "sleep, lock, logout, restart, shutdown, empty-trash, dark-mode, volume-up, volume-down, volume-mute, brightness-up, brightness-down, dnd, eject-all, show-desktop, keep-awake (the toggle: the default duration, or off), quit-all, unhide-all, dismiss-notifications, quick-look-selection (macOS)",
            "required": true
          }
        }
      },
      "awake": {
        "description": "Keep the machine awake, or let it sleep",
        "params": {
          "for": {
            "description": "How long: 45m, 2h, 1h30m, or a clock time like 14:30, or forever; blank with nothing else toggles (the default duration, or off while on)"
          },
          "until": {
            "description": "The same as for; a clock time reads best here (tomorrow's when today's has passed)"
          },
          "display": {
            "description": "Keep the display awake too (the setting otherwise)",
            "type": "boolean"
          },
          "app": {
            "description": "An app with a window open: the run ends when it quits (caffeinate -w)"
          },
          "off": {
            "description": "Allow sleep now",
            "type": "boolean"
          }
        }
      }
    },
    "palettes": {
      "system": {
        "title": "System",
        "tier": "primary",
        "kind": "live",
        "description": "What this machine can do from here; Keep Awake takes how long in the bar.",
        "keys": [
          {
            "keys": "enter",
            "title": "Run the command; on Keep Awake, for what the bar says (the default when blank); Allow Sleep while a run is on"
          },
          {
            "keys": "cmd+enter",
            "title": "On Keep Awake: until turned off"
          },
          {
            "keys": "cmd+u",
            "title": "On Keep Awake: a form for a time, an app to follow and the display"
          },
          {
            "keys": "cmd+d",
            "title": "On Allow Sleep: keep the display awake too, or let it sleep"
          }
        ]
      }
    },
    "states": {
      "awake": {
        "description": "A keep-awake run is on",
        "kind": "boolean"
      },
      "awake_until": {
        "description": "When the run ends, unix ms; null without an end",
        "kind": "number"
      },
      "awake_left": {
        "description": "Minutes left, rounded up; null without an end",
        "kind": "number"
      },
      "awake_display": {
        "description": "The display is kept awake too",
        "kind": "boolean"
      }
    },
    "bar": {
      "awake": {
        "title": "Keep Awake",
        "description": "A coffee glyph and what is left of the run (∞ without an end), a monitor mark when the display is kept awake too; hidden while off (`show = \"always\"` keeps a muted coffee). The popover: the run on a card with the time left and a bar, the presets as tiles on the digits, the display switch, Allow sleep on Enter; `u` opens a field for a time or a duration.",
        "refresh": {
          "every": 60,
          "on": [
            "wake"
          ]
        },
        "rules": [
          {
            "id": "ending",
            "when": "system.awake and system.awake_left \u003c= 5",
            "description": "Five minutes or less left.",
            "color": "amber"
          }
        ],
        "mocks": {
          "off": {
            "title": "Not kept awake",
            "item": {
              "hidden": true,
              "empty": {
                "icon": "󰛊",
                "tooltip": "Not kept awake"
              }
            }
          },
          "left": {
            "title": "25 minutes left",
            "item": {
              "icon": "󰛊",
              "title": "25m",
              "tooltip": "Awake until 14:55, 25 min left"
            }
          },
          "forever": {
            "title": "Until turned off",
            "item": {
              "icon": "󰛊",
              "title": "∞",
              "tooltip": "Awake until turned off"
            }
          },
          "display": {
            "title": "Display kept awake too",
            "item": {
              "icon": "󰛊",
              "title": "1h 59m",
              "segments": [
                {
                  "id": "display",
                  "icon": "󰍹",
                  "color": "muted",
                  "tooltip": "Display kept awake too"
                }
              ],
              "tooltip": "Awake until 16:29, 1 h 59 min left, display too"
            }
          },
          "ending": {
            "title": "Under five minutes",
            "item": {
              "icon": "󰛊",
              "title": "4m",
              "color": "amber",
              "tooltip": "Awake until 14:34, 4 min left"
            }
          }
        },
        "keys": [
          {
            "keys": "enter",
            "title": "Allow sleep (while on); keep awake for the default (while off)"
          },
          {
            "keys": "1",
            "title": "Keep awake for a preset (1 to 5, the tiles)"
          },
          {
            "keys": "d",
            "title": "Keep the display awake too, or let it sleep"
          },
          {
            "keys": "u",
            "title": "A field for a time or a duration: 45m, 14:30, forever, then Enter"
          },
          {
            "keys": "backspace",
            "title": "Allow sleep"
          },
          {
            "keys": "o",
            "title": "Open the System palette"
          }
        ],
        "settings": [
          {
            "kind": "list",
            "id": "presets",
            "label": "Presets",
            "placeholder": "30m, 1h, 2h, forever",
            "default": [
              "30m",
              "1h",
              "2h",
              "forever"
            ],
            "description": "The durations on the popover's tiles and its digit keys, five at most: durations, clock times, or forever."
          }
        ]
      }
    }
  },
  "playable": false,
  "updated_at": "2026-11-02T04:38:11Z",
  "url": "https://pal.cagdas.io/extensions/system",
  "tagline": "Sleep, lock, restart, dark mode, volume, keep awake",
  "category": "system",
  "screenshots": [
    "https://pal.cagdas.io/extensions/system/screenshots/1-list-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/1-list.png",
    "https://pal.cagdas.io/extensions/system/screenshots/2-root-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/2-root.png",
    "https://pal.cagdas.io/extensions/system/screenshots/3-confirm-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/3-confirm.png",
    "https://pal.cagdas.io/extensions/system/screenshots/4-apps-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/4-apps.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-display-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-display.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-field-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-field.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-forever-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-forever.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-sketchybar-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-sketchybar.png"
  ],
  "panel_screenshots": [
    "https://pal.cagdas.io/extensions/system/screenshots/1-list.png",
    "https://pal.cagdas.io/extensions/system/screenshots/2-root.png",
    "https://pal.cagdas.io/extensions/system/screenshots/3-confirm.png",
    "https://pal.cagdas.io/extensions/system/screenshots/4-apps.png"
  ],
  "bar_screenshots": [
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-display.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-field.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-forever.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-sketchybar.png"
  ],
  "panel_screenshots_dark": [
    "https://pal.cagdas.io/extensions/system/screenshots/1-list-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/2-root-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/3-confirm-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/4-apps-dark.png"
  ],
  "bar_screenshots_dark": [
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-display-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-menubar-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-field-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-forever-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-popover-dark.png",
    "https://pal.cagdas.io/extensions/system/screenshots/bar-sketchybar-dark.png"
  ],
  "has_bar": true,
  "bar_items": [
    {
      "id": "awake",
      "title": "Keep Awake",
      "description": "A coffee glyph and what is left of the run (∞ without an end), a monitor mark when the display is kept awake too; hidden while off (`show = \"always\"` keeps a muted coffee). The popover: the run on a card with the time left and a bar, the presets as tiles on the digits, the display switch, Allow sleep on Enter; `u` opens a field for a time or a duration.",
      "refresh": {
        "every": 60,
        "on": [
          "wake"
        ]
      },
      "refresh_words": "every 1 min, on wake"
    }
  ],
  "has_links": true,
  "links": [
    {
      "route": "run",
      "url": "pal://system/run?id=\u003cid\u003e",
      "cli": "pal call system/run id=\u003cid\u003e",
      "description": "Run a system command",
      "confirm": true,
      "params": [
        {
          "name": "id",
          "description": "sleep, lock, logout, restart, shutdown, empty-trash, dark-mode, volume-up, volume-down, volume-mute, brightness-up, brightness-down, dnd, eject-all, show-desktop, keep-awake (the toggle: the default duration, or off), quit-all, unhide-all, dismiss-notifications, quick-look-selection (macOS)",
          "required": true
        }
      ]
    },
    {
      "route": "awake",
      "url": "pal://system/awake",
      "cli": "pal call system/awake",
      "description": "Keep the machine awake, or let it sleep",
      "params": [
        {
          "name": "for",
          "description": "How long: 45m, 2h, 1h30m, or a clock time like 14:30, or forever; blank with nothing else toggles (the default duration, or off while on)"
        },
        {
          "name": "until",
          "description": "The same as for; a clock time reads best here (tomorrow's when today's has passed)"
        },
        {
          "name": "display",
          "description": "Keep the display awake too (the setting otherwise)",
          "type": "boolean"
        },
        {
          "name": "app",
          "description": "An app with a window open: the run ends when it quits (caffeinate -w)"
        },
        {
          "name": "off",
          "description": "Allow sleep now",
          "type": "boolean"
        }
      ]
    }
  ],
  "multi": false,
  "has_readme": true
}
