kitowall 3.5.13 → 3.5.14
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 +1 -1
- package/dist/core/init.js +15 -11
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/core/init.js
CHANGED
|
@@ -32,7 +32,7 @@ async function hostCmdExists(cmd) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
async function ensureHostDeps() {
|
|
35
|
-
const required = ['swww', 'swww-daemon', 'hyprctl'
|
|
35
|
+
const required = ['swww', 'swww-daemon', 'hyprctl'];
|
|
36
36
|
const missing = [];
|
|
37
37
|
for (const dep of required) {
|
|
38
38
|
if (!(await hostCmdExists(dep)))
|
|
@@ -45,8 +45,6 @@ async function ensureHostDeps() {
|
|
|
45
45
|
pkgSet.add('swww');
|
|
46
46
|
if (missing.includes('hyprctl'))
|
|
47
47
|
pkgSet.add('hyprland');
|
|
48
|
-
if (missing.includes('mpvpaper'))
|
|
49
|
-
pkgSet.add('mpvpaper');
|
|
50
48
|
const packages = Array.from(pkgSet);
|
|
51
49
|
// Best effort auto-install on Arch host; if it fails, we keep a clear actionable error.
|
|
52
50
|
if (packages.length > 0 && await hostCmdExists('pacman')) {
|
|
@@ -62,19 +60,25 @@ async function ensureHostDeps() {
|
|
|
62
60
|
}
|
|
63
61
|
if (stillMissing.length > 0) {
|
|
64
62
|
throw new Error(`Missing host dependencies: ${stillMissing.join(', ')}. ` +
|
|
65
|
-
`Install on host (Arch): sudo pacman -S --needed swww hyprland
|
|
63
|
+
`Install on host (Arch): sudo pacman -S --needed swww hyprland`);
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
|
-
async function
|
|
66
|
+
async function ensureHostFlatpakBridges(appId) {
|
|
69
67
|
const home = (0, node_os_1.homedir)();
|
|
70
68
|
const localBinDir = (0, node_path_1.join)(home, '.local', 'bin');
|
|
71
69
|
ensureDir(localBinDir);
|
|
72
|
-
const
|
|
73
|
-
|
|
70
|
+
const writeBridge = (name, command) => {
|
|
71
|
+
const bridgePath = (0, node_path_1.join)(localBinDir, name);
|
|
72
|
+
const bridgeScript = `#!/usr/bin/env bash
|
|
74
73
|
set -euo pipefail
|
|
75
|
-
exec /usr/bin/flatpak run --command
|
|
74
|
+
exec /usr/bin/flatpak run --command=${command} ${appId} "$@"
|
|
76
75
|
`;
|
|
77
|
-
|
|
76
|
+
(0, node_fs_1.writeFileSync)(bridgePath, bridgeScript, { encoding: 'utf8', mode: 0o755 });
|
|
77
|
+
return bridgePath;
|
|
78
|
+
};
|
|
79
|
+
writeBridge('kitowall', 'kitowall');
|
|
80
|
+
writeBridge('kitsune', 'kitsune');
|
|
81
|
+
const rendercoreBridgePath = writeBridge('kitsune-rendercore', 'kitsune-rendercore');
|
|
78
82
|
const userDir = (0, node_path_1.join)(home, '.config', 'systemd', 'user');
|
|
79
83
|
ensureDir(userDir);
|
|
80
84
|
const unitPath = (0, node_path_1.join)(userDir, 'kitsune-rendercore.service');
|
|
@@ -86,7 +90,7 @@ PartOf=graphical-session.target
|
|
|
86
90
|
|
|
87
91
|
[Service]
|
|
88
92
|
Type=simple
|
|
89
|
-
ExecStart=${
|
|
93
|
+
ExecStart=${rendercoreBridgePath}
|
|
90
94
|
Restart=on-failure
|
|
91
95
|
RestartSec=1
|
|
92
96
|
|
|
@@ -129,7 +133,7 @@ async function initKitowall(opts) {
|
|
|
129
133
|
// Validaciones mínimas
|
|
130
134
|
await ensureHostDeps();
|
|
131
135
|
if (isFlatpak) {
|
|
132
|
-
await
|
|
136
|
+
await ensureHostFlatpakBridges(flatpakAppId);
|
|
133
137
|
}
|
|
134
138
|
// Apagar servicios que pisan el wallpaper
|
|
135
139
|
await detectAndHandleConflicts(force);
|