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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user