From 6ff9784ff5e2cbc63d957e49023d9699db9ed47d Mon Sep 17 00:00:00 2001 From: SniverDaBest <106615041+SniverDaBest@users.noreply.github.com> Date: Sat, 6 Sep 2025 00:41:55 -0700 Subject: [PATCH 1/3] Working title showing --- shell.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.qml b/shell.qml index 791aac5..4191f93 100644 --- a/shell.qml +++ b/shell.qml @@ -210,7 +210,7 @@ PanelWindow { var titleProc = Qt.createQmlObject(` import Quickshell.Io Process { - command: ["playerctl", "metadata", "xesam:title"] + command: ["playerctl", "metadata", "--format", "{{artist}} - {{title}}"] running: true stdout: StdioCollector { onStreamFinished: { From cbc149370e8935a9e23973c23fbd01632c4ccb98 Mon Sep 17 00:00:00 2001 From: SniverDaBest <106615041+SniverDaBest@users.noreply.github.com> Date: Sat, 6 Sep 2025 00:55:36 -0700 Subject: [PATCH 2/3] Added config stuff --- config.js | 9 ++++++++- shell.qml | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 0dd0708..7861c0a 100644 --- a/config.js +++ b/config.js @@ -41,5 +41,12 @@ var c = { // Background color // Highly recommended to just keep this as "transparent" - backgroundColor: "transparent" + backgroundColor: "transparent", + + // Shows the artist's name. + showArtist: true, + + // Artist First + // Will show the artists name before the song's title. + artistFirst: false, } diff --git a/shell.qml b/shell.qml index 4191f93..ced6f73 100644 --- a/shell.qml +++ b/shell.qml @@ -31,6 +31,9 @@ PanelWindow { implicitWidth: bitmapTitle.width * configScale implicitHeight: bitmapTitle.height * configScale + property bool showArtist: Config.c.showArtist ?? true + property bool artistFirst: Config.c.artistFirst ?? false + property string musicTitleFontImage: "./fonts/MusicTitleFont.png" property string shinonomeGothicImage: "./fonts/ShinonomeGothic.png" property string ramcheImage: "./fonts/Ramche.png" @@ -207,10 +210,20 @@ PanelWindow { function checkTitleUpdate() { if (currentStatus === "Playing") { + var fmt = "{{artist}} - {{title}}"; + if (showArtist) { + if (artistFirst) { + fmt = "{{artist}} - {{title}}"; + } else { + fmt = "{{title}} - {{artist}}"; + } + } else { + fmt = "{{title}}"; + } var titleProc = Qt.createQmlObject(` import Quickshell.Io Process { - command: ["playerctl", "metadata", "--format", "{{artist}} - {{title}}"] + command: ["playerctl", "metadata", "--format", "${fmt}"] running: true stdout: StdioCollector { onStreamFinished: { From 97df42fab51f675cc5150f02962389de9176fa36 Mon Sep 17 00:00:00 2001 From: SniverDaBest <106615041+SniverDaBest@users.noreply.github.com> Date: Sat, 6 Sep 2025 00:57:06 -0700 Subject: [PATCH 3/3] Small readme change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9564681..fb754c3 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ After installing, edit `/etc/xdg/quickshell/deltatune/config.js`. Configuration - [x] Enter/leave animation - [x] Configuration - [x] AUR package -- [ ] Artist info(?) +- [x] Artist info(?) - [ ] 🦀 Rewrite it in Rust ## Additional credits