-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run configurable MPD frontend when clicking notification #56
Comments
I'm trying to work on this right now, actually! @natsukagami will you accept PRs that implement this? I was thinking of letting users specify which Currently, I use an ugly hack to achieve this for my prefered mpd client: diff --git a/introspect.go b/introspect.go
index 63c688c..913f853 100644
--- a/introspect.go
+++ b/introspect.go
@@ -43,6 +43,11 @@ func (i *Instance) IntrospectNode() *introspect.Node {
Type: "as",
Access: "read",
},
+ introspect.Property{
+ Name: "DesktopEntry",
+ Type: "as",
+ Access: "read",
+ },
},
Methods: []introspect.Method{
introspect.Method{
diff --git a/root.go b/root.go
index ad43163..767aed2 100644
--- a/root.go
+++ b/root.go
@@ -1,3 +1,3 @@
package mpris
import (
"fmt"
"github.com/godbus/dbus/v5"
"github.com/godbus/dbus/v5/prop"
)
@@ -19,7 +17,8 @@ func (m *MediaPlayer2) properties() map[string]*prop.Prop {
"CanQuit": newProp(false, nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:CanQuit
"CanRaise": newProp(false, nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:CanRaise
"HasTrackList": newProp(false, nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:HasTrackList
- "Identity": newProp(fmt.Sprintf("MPD on %s", m.Instance.mpd.Address), nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:Identity
+ "Identity": newProp("Plattenalbum", nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:Identity
+ "DesktopEntry": newProp("de.wagnermartin.Plattenalbum", nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:DesktopEntry // Empty because we can't add arbitary files in...
"SupportedUriSchemes": newProp([]string{}, nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:SupportedUriSchemes
"SupportedMimeTypes": newProp([]string{}, nil), // https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:SupportedMimeTypes |
This looks good. Something like a I will welcome a PR! |
eonpatapon/mpDris2#55
The text was updated successfully, but these errors were encountered: