Merge branch 'bartab-overhaul'

This commit is contained in:
Ly-sec 2025-09-08 12:21:18 +02:00
commit c02d3e3d22
59 changed files with 1651 additions and 821 deletions

View file

@ -38,6 +38,26 @@ Singleton {
})
property var widgetMetadata: ({
"ActiveWindow": {
"allowUserSettings": true,
"showIcon": true
},
"Battery": {
"allowUserSettings": true,
"alwaysShowPercentage": false,
"warningThreshold": 30
},
"Brightness": {
"allowUserSettings": true,
"alwaysShowPercentage": false
},
"Clock": {
"allowUserSettings": true,
"showDate": false,
"use12HourClock": false,
"showSeconds": false,
"reverseDayMonth": true
},
"CustomButton": {
"allowUserSettings": true,
"icon": "favorite",
@ -45,10 +65,44 @@ Singleton {
"rightClickExec": "",
"middleClickExec": ""
},
"Microphone": {
"allowUserSettings": true,
"alwaysShowPercentage": false
},
"NotificationHistory": {
"allowUserSettings": true,
"showUnreadBadge": true,
"hideWhenZero": true
},
"Spacer": {
"allowUserSettings": true,
"icon": "space_bar",
"width": 20
},
"SystemMonitor": {
"allowUserSettings": true,
"showCpuUsage": true,
"showCpuTemp": true,
"showMemoryUsage": true,
"showMemoryAsPercent": false,
"showNetworkStats": false
},
"Workspace": {
"allowUserSettings": true,
"labelMode": "index"
},
"MediaMini": {
"allowUserSettings": true,
"showAlbumArt": false,
"showVisualizer": false,
"visualizerType": "linear"
},
"SidePanelToggle": {
"allowUserSettings": true,
"useDistroLogo": false
},
"Volume": {
"allowUserSettings": true,
"alwaysShowPercentage": false
}
})

View file

@ -37,9 +37,7 @@ Singleton {
Process {
id: process
stdinEnabled: true
running: (Settings.data.audio.visualizerType !== "none")
&& (PanelService.getPanel("sidePanel").active || Settings.data.audio.showMiniplayerCava
|| (PanelService.lockScreen && PanelService.lockScreen.active))
running: true
command: ["cava", "-p", "/dev/stdin"]
onExited: {
stdinEnabled = true

View file

@ -45,7 +45,7 @@ Singleton {
property string version: "Unknown"
property var contributors: []
property double timestamp: 0
property real timestamp: 0
}
}

View file

@ -80,7 +80,7 @@ Singleton {
JsonAdapter {
id: historyAdapter
property var history: []
property double timestamp: 0
property real timestamp: 0
}
}
@ -201,12 +201,17 @@ Singleton {
const items = historyAdapter.history || []
for (var i = 0; i < items.length; i++) {
const it = items[i]
// Coerce legacy second-based timestamps to milliseconds
var ts = it.timestamp
if (typeof ts === "number" && ts < 1e12) {
ts = ts * 1000
}
historyModel.append({
"summary": it.summary || "",
"body": it.body || "",
"appName": it.appName || "",
"urgency": it.urgency,
"timestamp": it.timestamp ? new Date(it.timestamp) : new Date()
"timestamp": ts ? new Date(ts) : new Date()
})
}
} catch (e) {
@ -225,7 +230,10 @@ Singleton {
"body": n.body,
"appName": n.appName,
"urgency": n.urgency,
"timestamp": (n.timestamp instanceof Date) ? n.timestamp.getTime() : n.timestamp
"timestamp"// Always persist in milliseconds
: (n.timestamp instanceof Date) ? n.timestamp.getTime(
) : (typeof n.timestamp === "number"
&& n.timestamp < 1e12 ? n.timestamp * 1000 : n.timestamp)
})
}
historyAdapter.history = arr

View file

@ -216,7 +216,11 @@ Singleton {
// -------------------------------------------------------------------
// Get specific monitor wallpaper - now from cache
function getWallpaper(screenName) {
return currentWallpapers[screenName] || ""
var path = currentWallpapers[screenName] || ""
if (path === "") {
return Settings.data.wallpaper.defaultWallpaper || ""
}
return path
}
// -------------------------------------------------------------------