diff --git a/Services/FocusedWindowService.qml b/Services/FocusedWindowService.qml index dfb7f167..59d62aa0 100644 --- a/Services/FocusedWindowService.qml +++ b/Services/FocusedWindowService.qml @@ -34,7 +34,7 @@ Singleton { Connections { target: NiriWorkspaceService function onFocusedWindowIdChanged() { - root.focusedWindowId = NiriWorkspaceService.focusedWindowId + root.focusedWindowId = parseInt(NiriWorkspaceService.focusedWindowId) || -1 updateFocusedWindowData() } function onFocusedWindowTitleChanged() { diff --git a/Widgets/SettingsPopup.qml b/Widgets/SettingsPopup.qml index 3848f54e..dcd91a98 100644 --- a/Widgets/SettingsPopup.qml +++ b/Widgets/SettingsPopup.qml @@ -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) + } } } } diff --git a/Widgets/TopBar/AudioVisualization.qml b/Widgets/TopBar/AudioVisualization.qml index f2191684..fd089f9c 100644 --- a/Widgets/TopBar/AudioVisualization.qml +++ b/Widgets/TopBar/AudioVisualization.qml @@ -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) }