Skip to content

Commit 2f60613

Browse files
committed
WIP: support dock spacers
1 parent fdc92a2 commit 2f60613

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utils.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ function getAppNamesToIconPaths(parsedDockData) {
3737

3838
for (const parsedAppData of persistentApps) {
3939
const appName = parsedAppData.dict[0].string[1];
40-
const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
41-
const appDirectory = url.fileURLToPath(appDirectoryUrl)
42-
43-
if (isAppNameAllowed(appName)) {
44-
result[appName] = getIconPath(appDirectory);
40+
if(Array.isArray(parsedAppData.dict[0].dict)) {
41+
const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
42+
const appDirectory = url.fileURLToPath(appDirectoryUrl)
43+
if (isAppNameAllowed(appName)) {
44+
result[appName] = getIconPath(appDirectory);
45+
}
46+
} else if(parsedAppData.key.includes('tile-type')) {
47+
// TODO: implement spacers
4548
}
49+
4650
}
4751
return result;
4852
}

0 commit comments

Comments
 (0)