kitowall 2.4.0 → 2.6.0
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/core/workshop.js +49 -2
- package/package.json +1 -1
package/dist/core/workshop.js
CHANGED
|
@@ -72,6 +72,48 @@ function resolveOnPath(binary) {
|
|
|
72
72
|
}
|
|
73
73
|
return undefined;
|
|
74
74
|
}
|
|
75
|
+
function buildSceneEngineEnv(enginePath) {
|
|
76
|
+
const env = { ...process.env };
|
|
77
|
+
const libPaths = [];
|
|
78
|
+
const seen = new Set();
|
|
79
|
+
const pushLibPath = (candidate) => {
|
|
80
|
+
const value = clean(candidate);
|
|
81
|
+
if (!value || seen.has(value))
|
|
82
|
+
return;
|
|
83
|
+
seen.add(value);
|
|
84
|
+
libPaths.push(value);
|
|
85
|
+
};
|
|
86
|
+
const current = clean(process.env.LD_LIBRARY_PATH);
|
|
87
|
+
if (current) {
|
|
88
|
+
for (const segment of current.split(':')) {
|
|
89
|
+
const v = clean(segment);
|
|
90
|
+
if (v)
|
|
91
|
+
pushLibPath(v);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const resolvedEngine = clean(enginePath);
|
|
95
|
+
if (resolvedEngine) {
|
|
96
|
+
const engineDir = node_path_1.default.dirname(resolvedEngine);
|
|
97
|
+
if (node_fs_1.default.existsSync(node_path_1.default.join(engineDir, 'libcef.so'))) {
|
|
98
|
+
pushLibPath(engineDir);
|
|
99
|
+
}
|
|
100
|
+
const siblingLib = node_path_1.default.join(engineDir, 'lib');
|
|
101
|
+
if (node_fs_1.default.existsSync(siblingLib) && node_fs_1.default.statSync(siblingLib).isDirectory()) {
|
|
102
|
+
pushLibPath(siblingLib);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Arch linux-wallpaperengine installs runtime libs here when bypassing the wrapper.
|
|
106
|
+
if (node_fs_1.default.existsSync('/opt/linux-wallpaperengine/libcef.so')) {
|
|
107
|
+
pushLibPath('/opt/linux-wallpaperengine');
|
|
108
|
+
}
|
|
109
|
+
if (node_fs_1.default.existsSync('/opt/linux-wallpaperengine/lib') && node_fs_1.default.statSync('/opt/linux-wallpaperengine/lib').isDirectory()) {
|
|
110
|
+
pushLibPath('/opt/linux-wallpaperengine/lib');
|
|
111
|
+
}
|
|
112
|
+
if (libPaths.length > 0) {
|
|
113
|
+
env.LD_LIBRARY_PATH = libPaths.join(':');
|
|
114
|
+
}
|
|
115
|
+
return env;
|
|
116
|
+
}
|
|
75
117
|
function getWePaths() {
|
|
76
118
|
const root = node_path_1.default.join(node_os_1.default.homedir(), '.local', 'share', 'kitsune', 'we');
|
|
77
119
|
return {
|
|
@@ -157,6 +199,7 @@ function getCoexistServices() {
|
|
|
157
199
|
const cfg = readWeConfig();
|
|
158
200
|
const defaults = [
|
|
159
201
|
'swww-daemon.service',
|
|
202
|
+
'swww-daemon@kitowall.service',
|
|
160
203
|
'hyprwall-watch.service',
|
|
161
204
|
'hyprwall-next.timer',
|
|
162
205
|
'kitowall-next.timer'
|
|
@@ -577,7 +620,11 @@ function workshopSceneEngineStatus() {
|
|
|
577
620
|
const resolved = resolveOnPath(cmd);
|
|
578
621
|
if (!resolved)
|
|
579
622
|
continue;
|
|
580
|
-
const verOut = (0, node_child_process_1.spawnSync)(resolved, ['--version'], {
|
|
623
|
+
const verOut = (0, node_child_process_1.spawnSync)(resolved, ['--version'], {
|
|
624
|
+
encoding: 'utf8',
|
|
625
|
+
timeout: 2500,
|
|
626
|
+
env: buildSceneEngineEnv(resolved)
|
|
627
|
+
});
|
|
581
628
|
const stdout = clean(verOut.stdout) ?? '';
|
|
582
629
|
const stderr = clean(verOut.stderr) ?? '';
|
|
583
630
|
const version = (stdout.split('\n')[0] || stderr.split('\n')[0] || '').trim();
|
|
@@ -1298,7 +1345,7 @@ function spawnSceneEngine(monitor, wallpaperDir) {
|
|
|
1298
1345
|
const child = (0, node_child_process_1.spawn)(enginePath, ['--screen-root', monitor, '--bg', wallpaperDir], {
|
|
1299
1346
|
detached: true,
|
|
1300
1347
|
stdio: 'ignore',
|
|
1301
|
-
env:
|
|
1348
|
+
env: buildSceneEngineEnv(enginePath)
|
|
1302
1349
|
});
|
|
1303
1350
|
let settled = false;
|
|
1304
1351
|
const done = (fn) => {
|