mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 15:52:58 -04:00
switch hto monorepo structure
This commit is contained in:
16
quickshell/Services/MprisController.qml
Normal file
16
quickshell/Services/MprisController.qml
Normal file
@@ -0,0 +1,16 @@
|
||||
pragma Singleton
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.Mpris
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property list<MprisPlayer> availablePlayers: Mpris.players.values
|
||||
|
||||
property MprisPlayer activePlayer: availablePlayers.find(p => p.isPlaying) ?? availablePlayers.find(p => p.canControl && p.canPlay) ?? null
|
||||
}
|
||||
Reference in New Issue
Block a user