aboutsummaryrefslogtreecommitdiffstats
path: root/window-switcher/Switcher.qml
diff options
context:
space:
mode:
Diffstat (limited to 'window-switcher/Switcher.qml')
-rw-r--r--window-switcher/Switcher.qml32
1 files changed, 31 insertions, 1 deletions
diff --git a/window-switcher/Switcher.qml b/window-switcher/Switcher.qml
index 3bc6a86..88924d8 100644
--- a/window-switcher/Switcher.qml
+++ b/window-switcher/Switcher.qml
@@ -10,6 +10,7 @@
// GNU General Public License for more details.
import Quickshell
+import Quickshell.Io
import Quickshell.Wayland
import QtQuick
import "Expose.js" as Expose
@@ -94,9 +95,38 @@ Scope {
Keys.onUpPressed: scatter.move(0, -1)
Keys.onDownPressed: scatter.move(0, 1)
+ // The bare desktop: DP-1's wallpaper, lightly dimmed, drawn opaque over the
+ // real windows, so the previews sit on an empty screen rather
+ // than a dim. Theme.base stands in without wallp. The whole
+ // overlay fades in once the picture is decoded, so the real
+ // windows dissolve into it instead of being swapped out.
Rectangle {
anchors.fill: parent
- color: Qt.rgba(Theme.base.r, Theme.base.g, Theme.base.b, 0.82)
+ color: Theme.base
+ opacity: wallImage.status === Image.Ready || wallImage.status === Image.Error || wallImage.source == "" ? 1 : 0
+ Behavior on opacity { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } }
+
+ Image {
+ id: wallImage
+ anchors.fill: parent
+ source: wallFile.text().trim() !== "" ? "file://" + wallFile.text().trim() : ""
+ fillMode: Image.PreserveAspectCrop
+ asynchronous: true
+ cache: false
+ }
+
+ // A light dim over the wallpaper: a bright picture at full
+ // strength glares behind the previews.
+ Rectangle {
+ anchors.fill: parent
+ color: Qt.rgba(Theme.base.r, Theme.base.g, Theme.base.b, 0.4)
+ }
+
+ FileView {
+ id: wallFile
+ path: Quickshell.env("HOME") + "/.config/wallp/wall_h"
+ blockLoading: true
+ }
MouseArea {
anchors.fill: parent