@hasna/machines 0.0.6 → 0.0.7
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/dist/cli/index.js
CHANGED
|
@@ -18219,15 +18219,32 @@ function hasDisplayServer() {
|
|
|
18219
18219
|
const wayland = process.env["WAYLAND_DISPLAY"] || "";
|
|
18220
18220
|
if (display || wayland)
|
|
18221
18221
|
return true;
|
|
18222
|
-
|
|
18223
|
-
|
|
18224
|
-
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
|
|
18228
|
-
|
|
18229
|
-
|
|
18230
|
-
|
|
18222
|
+
if (process.platform === "darwin")
|
|
18223
|
+
return true;
|
|
18224
|
+
if (process.platform === "linux") {
|
|
18225
|
+
try {
|
|
18226
|
+
const result = Bun.spawnSync(["loginctl", "list-sessions", "--no-legend"], { stdout: "pipe", stderr: "pipe", env: process.env, timeout: 2000 });
|
|
18227
|
+
if (result.exitCode === 0) {
|
|
18228
|
+
const sessions = result.stdout.toString("utf8").trim();
|
|
18229
|
+
if (sessions) {
|
|
18230
|
+
for (const line of sessions.split(`
|
|
18231
|
+
`)) {
|
|
18232
|
+
const sessionId = line.trim().split(/\s+/)[0];
|
|
18233
|
+
if (sessionId) {
|
|
18234
|
+
const typeResult = Bun.spawnSync(["loginctl", "show-session", sessionId, "-p", "Type", "--value"], { stdout: "pipe", stderr: "pipe", env: process.env, timeout: 2000 });
|
|
18235
|
+
if (typeResult.exitCode === 0) {
|
|
18236
|
+
const sessionType = typeResult.stdout.toString("utf8").trim();
|
|
18237
|
+
if (sessionType === "wayland" || sessionType === "x11") {
|
|
18238
|
+
return true;
|
|
18239
|
+
}
|
|
18240
|
+
}
|
|
18241
|
+
}
|
|
18242
|
+
}
|
|
18243
|
+
}
|
|
18244
|
+
}
|
|
18245
|
+
} catch {}
|
|
18246
|
+
return false;
|
|
18247
|
+
}
|
|
18231
18248
|
return false;
|
|
18232
18249
|
}
|
|
18233
18250
|
function computeHash2(content) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard-daemon.d.ts","sourceRoot":"","sources":["../../src/commands/clipboard-daemon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clipboard-daemon.d.ts","sourceRoot":"","sources":["../../src/commands/clipboard-daemon.ts"],"names":[],"mappings":"AA2HA,wBAAgB,mBAAmB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAO9E;AAED,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CA6DxD"}
|