summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-11 22:06:08 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-11 22:06:08 +0800
commitce5f49a9324bceccab821c1d2ebf3f72bdfc09ea (patch)
tree7fbf6cef227e5c740be23c431f77243246995a21
parent10c31b87eb470fc3329fa18b1fa48f8b031139a0 (diff)
mpris icon
-rw-r--r--bar/Mpris.qml3
-rw-r--r--config/Icons.qml40
2 files changed, 27 insertions, 16 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml
index 5ebcb74..87bef93 100644
--- a/bar/Mpris.qml
+++ b/bar/Mpris.qml
@@ -3,6 +3,7 @@ import QtQuick
import Quickshell
import Quickshell.Services.Mpris
import qs.services
+import qs.config
// import Quickshell.Utils
@@ -15,7 +16,7 @@ Item {
readonly property string position: friendlyTimeForSeconds(activePlayer?.position) || "0:00"
readonly property string length: friendlyTimeForSeconds(activePlayer?.length) || "0:00"
readonly property string progress: activePlayer.positionSupported && position != length ? position + "/" + length : activePlayer.positionSupported && !activePlayer.lengthSupported ? !activePlayer.positionSupported && activePlayer.lengthSupported ? "" : position : activePlayer.lengthSupported ? length : ""
- readonly property string state: activePlayer?.isPlaying ? "Playing" : "Paused"
+ readonly property string state: activePlayer?.isPlaying ? Icons.media.pause : Icons.media.play
function cleanMusicTitle(title: string): string {
if (!title)
diff --git a/config/Icons.qml b/config/Icons.qml
index df9636e..ec52e80 100644
--- a/config/Icons.qml
+++ b/config/Icons.qml
@@ -3,20 +3,30 @@ pragma Singleton
import Quickshell
Singleton {
- id: root
+ id: root
- readonly property var ws: ({
- 1: "",
- 2: "",
- 3: "",
- 4: "",
- 5: "",
- 6: "",
- 7: "",
- 8: "",
- 9: "",
- urgent: "",
- active: "",
- default: " ",
- })
+ readonly property var ws: ({
+ 1: "",
+ 2: "",
+ 3: "",
+ 4: "",
+ 5: "",
+ 6: "",
+ 7: "",
+ 8: "",
+ 9: "",
+ urgent: "",
+ active: "",
+ default: " "
+ })
+
+ readonly property var media: ({
+ play: "",
+ pause: "",
+ stop: "",
+ // next: "",
+ // prev: "",
+ mute: "",
+ unmute: ""
+ })
}