@narumitw/pi-caffeinate 0.1.35 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,7 @@ It is designed for long-running coding, refactoring, debugging, web research, an
14
14
  - Supports macOS, Windows, WSL, and Linux.
15
15
  - Provides `/caffeinate-status` and `/caffeinate-stop` commands.
16
16
  - Allows a custom inhibitor command through environment configuration.
17
+ - Allows a custom status icon through environment configuration.
17
18
  - Fails safely when no supported inhibitor is available.
18
19
 
19
20
  ## 📦 Install
@@ -74,6 +75,12 @@ PI_CAFFEINATE_COMMAND='systemd-inhibit --what=idle:sleep --why="pi running" --mo
74
75
 
75
76
  The custom command is parsed with shell-like quoting and is run directly without a shell.
76
77
 
78
+ Customise the status bar icon (default: `💊`):
79
+
80
+ ```bash
81
+ PI_CAFFEINATE_ICON='☕️' pi
82
+ ```
83
+
77
84
  ## 🧠 Why use pi-caffeinate?
78
85
 
79
86
  AI coding agents often run tool-heavy tasks that take several minutes. `pi-caffeinate` keeps your machine awake during active Pi work, helping browser automation, local builds, test runs, code generation, and long prompts finish reliably.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-caffeinate",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "Pi extension that keeps the computer awake while the agent is running.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/caffeinate.ts CHANGED
@@ -320,12 +320,12 @@ function updateStatus(ctx: ExtensionContext) {
320
320
  }
321
321
 
322
322
  if (state.process) {
323
- ctx.ui.setStatus(STATUS_KEY, "💊 awake");
323
+ ctx.ui.setStatus(STATUS_KEY, `${getIcon()} awake`);
324
324
  return;
325
325
  }
326
326
 
327
327
  if (!state.available) {
328
- ctx.ui.setStatus(STATUS_KEY, "💊 unavailable");
328
+ ctx.ui.setStatus(STATUS_KEY, `${getIcon()} unavailable`);
329
329
  return;
330
330
  }
331
331
 
@@ -352,3 +352,7 @@ function isDisabled() {
352
352
  const value = process.env.PI_CAFFEINATE_DISABLED?.trim().toLowerCase();
353
353
  return value ? DISABLED_VALUES.has(value) : false;
354
354
  }
355
+
356
+ function getIcon() {
357
+ return process.env.PI_CAFFEINATE_ICON?.trim() ?? "💊";
358
+ }