1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

feat: AppsDock Widget on the Dankbar

- Pinnable apps independent from the main dock
- Drag & Drop support
This commit is contained in:
purian23
2026-01-23 11:49:45 -05:00
parent 3936a516f8
commit 808ee66e11
8 changed files with 1354 additions and 2 deletions

View File

@@ -83,6 +83,7 @@ Singleton {
property string nightModeLocationProvider: ""
property var pinnedApps: []
property var barPinnedApps: []
property int dockLauncherPosition: 0
property var hiddenTrayIds: []
property var recentColors: []
@@ -784,6 +785,32 @@ Singleton {
return appId && pinnedApps.indexOf(appId) !== -1;
}
function setBarPinnedApps(apps) {
barPinnedApps = apps;
saveSettings();
}
function addBarPinnedApp(appId) {
if (!appId)
return;
var currentPinned = [...barPinnedApps];
if (currentPinned.indexOf(appId) === -1) {
currentPinned.push(appId);
setBarPinnedApps(currentPinned);
}
}
function removeBarPinnedApp(appId) {
if (!appId)
return;
var currentPinned = barPinnedApps.filter(id => id !== appId);
setBarPinnedApps(currentPinned);
}
function isBarPinnedApp(appId) {
return appId && barPinnedApps.indexOf(appId) !== -1;
}
function hideTrayId(trayId) {
if (!trayId)
return;