Skip to content

Commit

Permalink
WIP: support dock spacers
Browse files Browse the repository at this point in the history
  • Loading branch information
kspeyanski committed Feb 1, 2023
1 parent fdc92a2 commit 8e51d56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ function getAppNamesToIconPaths(parsedDockData) {

for (const parsedAppData of persistentApps) {
const appName = parsedAppData.dict[0].string[1];
const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
const appDirectory = url.fileURLToPath(appDirectoryUrl)

if (isAppNameAllowed(appName)) {
result[appName] = getIconPath(appDirectory);
if(Array.isArray(parsedAppData.dict[0].dict)) {
const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
const appDirectory = url.fileURLToPath(appDirectoryUrl)
if (isAppNameAllowed(appName)) {
result[appName] = getIconPath(appDirectory);
}
} else if(parsedAppData.key.includes('tile-type')) {
// TODO: implement spacers
}

}
return result;
}
Expand Down

0 comments on commit 8e51d56

Please sign in to comment.