diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-14 12:24:13 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-14 12:24:13 +0200 |
| commit | d203d938f005d7542bf13e217ac51917866a8ace (patch) | |
| tree | c4a6d8728461099638a3fc3378ba7fb34a2b5874 /desktop/modules/sound/SoundModule.qml | |
| parent | 55619e7dc830697d2929b0bd5cf1c6dc7435720c (diff) | |
| download | quickshell-d203d938f005d7542bf13e217ac51917866a8ace.tar.gz quickshell-d203d938f005d7542bf13e217ac51917866a8ace.zip | |
feat(desktop): move volume-osd in as the sound module
VolumeOsd.qml did three jobs in one file: PipeWire tracking, the OSD
surface and the player transport. They become Service, Osd and the page.
The OSD keeps its namespace so the existing Hyprland blur rule still
matches, and the service stays always-active because the OSD has to
answer a keypress with no drawer open.
Diffstat (limited to 'desktop/modules/sound/SoundModule.qml')
| -rw-r--r-- | desktop/modules/sound/SoundModule.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/desktop/modules/sound/SoundModule.qml b/desktop/modules/sound/SoundModule.qml new file mode 100644 index 0000000..420414c --- /dev/null +++ b/desktop/modules/sound/SoundModule.qml @@ -0,0 +1,40 @@ +// Copyright (C) 2026 Danilo M. <danix@danix.xyz> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +import QtQuick +import "../.." + +// Always active: the OSD must react to a volume keypress with no drawer open, +// which is the whole reason this module's service cannot be lazy. +Module { + id: mod + + name: "sound" + icon: "" + label: "Sound" + alwaysActive: true + + readonly property Service service: Service {} + + // The OSD is this module's own window, outside the drawer entirely. + readonly property Osd osd: Osd { service: mod.service } + + tileContent: Component { + SoundTile { service: mod.service } + } + + page: Component { + Page { + title: "Sound" + SoundPage { width: parent.width; service: mod.service } + } + } +} |
