clipshot 1.0.6 → 1.0.8

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Screenshot monitor CLI. Watches clipboard for screenshots and uploads to remote server via SSH, or saves locally.
4
4
 
5
+ ![Demo](demo_video.gif)
6
+
5
7
  ## Why?
6
8
 
7
9
  When using AI CLI tools like Claude Code, Codex, or others, you often need to share screenshots with them. But when you SSH into a remote server to use these tools, you can't paste images at all.
package/demo_video.gif ADDED
Binary file
package/dist/index.js CHANGED
@@ -141,16 +141,30 @@ function uninstall() {
141
141
  }
142
142
  function stopBackground() {
143
143
  try {
144
- // Use bracket trick to avoid pgrep matching itself
144
+ // First check if any processes are running
145
145
  const result = (0, child_process_1.execSync)("pgrep -f 'node.*[c]lipshot.*--daemon'", { encoding: "utf8" });
146
146
  const pids = result.trim().split("\n").filter(Boolean);
147
- for (const pid of pids) {
148
- process.kill(parseInt(pid), "SIGTERM");
149
- console.log(`Stopped process ${pid}`);
150
- }
151
147
  if (pids.length === 0) {
152
148
  console.log("No clipshot process running");
149
+ return;
150
+ }
151
+ // Use pkill for reliable process termination
152
+ try {
153
+ (0, child_process_1.execSync)("pkill -f 'node.*clipshot.*--daemon'", { encoding: "utf8" });
154
+ }
155
+ catch {
156
+ // pkill returns non-zero even on success sometimes
157
+ }
158
+ // Verify they're stopped
159
+ try {
160
+ (0, child_process_1.execSync)("pgrep -f 'node.*[c]lipshot.*--daemon'", { encoding: "utf8" });
161
+ // If we get here, some processes survived - try SIGKILL
162
+ (0, child_process_1.execSync)("pkill -9 -f 'node.*clipshot.*--daemon'", { encoding: "utf8" });
163
+ }
164
+ catch {
165
+ // No processes found - good
153
166
  }
167
+ console.log(`Stopped ${pids.length} process(es)`);
154
168
  }
155
169
  catch {
156
170
  console.log("No clipshot process running");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clipshot",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Screenshot monitor CLI tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {