stikfix 1.6.1 → 1.6.2

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.
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import { spawn } from 'node:child_process';
22
22
  import { writeFileSync, mkdirSync } from 'node:fs';
23
- import { join } from 'node:path';
23
+ import { dirname, join } from 'node:path';
24
24
  import { homedir } from 'node:os';
25
25
  /**
26
26
  * Directory + path where the embedded tray script is written on each start.
@@ -48,6 +48,7 @@ export function trayScriptPath() {
48
48
  */
49
49
  export const TRAY_PS1 = String.raw `param(
50
50
  [int]$Port,
51
+ [string]$IconPath,
51
52
  [string]$Root,
52
53
  [string]$Name,
53
54
  [string]$NotesDir,
@@ -67,6 +68,7 @@ try {
67
68
  # --- Resolve a custom app icon, else fall back to a stock icon -------------
68
69
  function Get-BaseIcon {
69
70
  $candidates = @(
71
+ $IconPath,
70
72
  (Join-Path $PSScriptRoot 'stikfix.ico'),
71
73
  (Join-Path $Root '.output\chrome-mv3\icon\stikfix.ico'),
72
74
  (Join-Path $Root 'public\icon\stikfix.ico')
@@ -193,6 +195,8 @@ export function startTray(opts) {
193
195
  const ps1Path = trayScriptPath();
194
196
  mkdirSync(join(homedir(), '.local', 'share', 'stikfix'), { recursive: true });
195
197
  writeFileSync(ps1Path, TRAY_PS1, { encoding: 'utf8' });
198
+ // Installed host ships stikfix.ico next to the exe ({app}\stikfix.ico). For npx/dev this points at node's dir and simply won't resolve — Get-BaseIcon falls back to a stock icon.
199
+ const iconPath = join(dirname(process.execPath), 'stikfix.ico');
196
200
  const child = spawn('powershell.exe', [
197
201
  '-NoProfile',
198
202
  '-ExecutionPolicy',
@@ -203,6 +207,8 @@ export function startTray(opts) {
203
207
  ps1Path,
204
208
  '-Port',
205
209
  String(opts.port),
210
+ '-IconPath',
211
+ iconPath,
206
212
  '-Root',
207
213
  opts.root,
208
214
  '-Name',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stikfix",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Pin sticky notes on any page — your AI reads them.",
5
5
  "license": "MIT",
6
6
  "author": "Omer Nesher <omernesher@gmail.com>",