diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-07 12:00:58 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-07 12:00:58 +0100 |
| commit | d9a76b01d5a50af44e576c62efc1dbbf76db6203 (patch) | |
| tree | 921d6dbbf17f87a64aa8379807fdceab69fa02fb /desktop/modules/sonix/SonixModule.qml | |
| parent | 0811ff78e1716a7984aaa315bac0b2b4a8de248d (diff) | |
| download | quickshell-d9a76b01d5a50af44e576c62efc1dbbf76db6203.tar.gz quickshell-d9a76b01d5a50af44e576c62efc1dbbf76db6203.zip | |
sonix: drawer tile and the Device tab
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/sonix/SonixModule.qml')
| -rw-r--r-- | desktop/modules/sonix/SonixModule.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/desktop/modules/sonix/SonixModule.qml b/desktop/modules/sonix/SonixModule.qml new file mode 100644 index 0000000..5146bf8 --- /dev/null +++ b/desktop/modules/sonix/SonixModule.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 "../.." + +// The Sonix player in the drawer: a tile while it is on the network, and a +// page with its device state, playlists and folders. See README.md. +Module { + id: sonixMod + + name: "sonix" + label: Sonix.name || "Sonix" + icon: String.fromCodePoint(0xF075A) // md-music + tiled: Sonix.present + active: Sonix.present && Sonix.player.state === 1 + + // Names typed under Playlists > New: SonixLink makes a playlist only by + // adding a track to it, so a new one lives here until its first track. + property var draftPlaylists: [] + + tileContent: Component { SonixTile {} } + + page: Component { + Page { + id: pg + title: Sonix.name || "Sonix" + // Not `mod: mod`: inside SonixPage that names its own property. + SonixPage { width: parent.width; mod: sonixMod; onGo: name => pg.go(name) } + } + } +} |
