mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
Fix some log warnings
This commit is contained in:
@@ -34,7 +34,7 @@ Singleton {
|
||||
Connections {
|
||||
target: NiriWorkspaceService
|
||||
function onFocusedWindowIdChanged() {
|
||||
root.focusedWindowId = NiriWorkspaceService.focusedWindowId
|
||||
root.focusedWindowId = parseInt(NiriWorkspaceService.focusedWindowId) || -1
|
||||
updateFocusedWindowData()
|
||||
}
|
||||
function onFocusedWindowTitleChanged() {
|
||||
|
||||
@@ -192,14 +192,18 @@ PanelWindow {
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
mipmap: true
|
||||
cache: false
|
||||
cache: true
|
||||
|
||||
property string lastLoggedSource: ""
|
||||
|
||||
onStatusChanged: {
|
||||
console.log("Profile image status:", status, "source:", source)
|
||||
if (status === Image.Ready) {
|
||||
console.log("Image loaded successfully, size:", sourceSize.width + "x" + sourceSize.height)
|
||||
} else if (status === Image.Error) {
|
||||
console.log("Image failed to load")
|
||||
if (source !== lastLoggedSource && (status === Image.Ready || status === Image.Error)) {
|
||||
lastLoggedSource = source
|
||||
if (status === Image.Ready) {
|
||||
console.log("Profile image loaded successfully, size:", sourceSize.width + "x" + sourceSize.height)
|
||||
} else if (status === Image.Error) {
|
||||
console.log("Profile image failed to load:", source)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ Item {
|
||||
property bool hasActiveMedia: false
|
||||
property var activePlayer: null
|
||||
property bool cavaAvailable: false
|
||||
property bool configCreated: false
|
||||
|
||||
width: 20
|
||||
height: Theme.iconSize
|
||||
@@ -21,10 +22,10 @@ Item {
|
||||
running: true
|
||||
onExited: (exitCode) => {
|
||||
root.cavaAvailable = exitCode === 0
|
||||
if (root.cavaAvailable) {
|
||||
if (root.cavaAvailable && !root.configCreated) {
|
||||
console.log("cava found - creating config and enabling real audio visualization")
|
||||
configWriter.running = true
|
||||
} else {
|
||||
} else if (!root.cavaAvailable) {
|
||||
console.log("cava not found - using fallback animation")
|
||||
fallbackTimer.running = Qt.binding(() => root.hasActiveMedia && root.activePlayer?.playbackState === MprisPlaybackState.Playing)
|
||||
}
|
||||
@@ -33,7 +34,7 @@ Item {
|
||||
|
||||
Process {
|
||||
id: configWriter
|
||||
running: root.cavaAvailable
|
||||
running: false
|
||||
command: [
|
||||
"sh", "-c",
|
||||
`cat > /tmp/quickshell_cava_config << 'EOF'
|
||||
@@ -57,6 +58,7 @@ EOF`
|
||||
]
|
||||
|
||||
onExited: {
|
||||
root.configCreated = true
|
||||
if (root.cavaAvailable) {
|
||||
cavaProcess.running = Qt.binding(() => root.hasActiveMedia && root.activePlayer?.playbackState === MprisPlaybackState.Playing)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user