commit 6943d864976227a994a85487ab19827315f7b219
parent 76c684a8a67aa326e87134e42c2d440539713bdc
Author: Sven Möller <sven@svemoe.de>
Date: Sun, 5 Mar 2023 22:19:48 +0100
Use mpris2
Diffstat:
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/bin/.local/bin/player b/bin/.local/bin/player
@@ -5,18 +5,18 @@ case $1 in
pgrep mpv \
&& echo '{ "command": ["cycle", "pause"] }' \
| socat - "/tmp/mpvsocket" \
- || mpc toggle
+ || playerctl play-pause
;;
next)
pgrep mpv \
&& echo '{ "command": ["seek", "30"] }' \
| socat - "/tmp/mpvsocket" \
- || mpc next
+ || playerctl next
;;
prev)
pgrep mpv \
&& echo '{ "command": ["seek", "-15", "exact"] }' \
| socat - "/tmp/mpvsocket" \
- || mpc prev
+ || playerctl previous
;;
esac
diff --git a/mpDris2/.config/mpDris2/mpDris2.conf b/mpDris2/.config/mpDris2/mpDris2.conf
@@ -0,0 +1,19 @@
+# Copy this to /etc/mpDris2.conf or ~/.config/mpDris2/mpDris2.conf
+# Default values are shown here, commented out.
+
+[Connection]
+# You can also export $MPD_HOST and/or $MPD_PORT to change the server.
+#host = localhost
+#port = 6600
+#password =
+
+[Library]
+#music_dir =
+#cover_regex = ^(album|cover|\.?folder|front).*\.(gif|jpeg|jpg|png)$
+
+[Bling]
+mmkeys = False
+notify = True
+notify_paused = False
+# Urgency of the notification: 0 for low, 1 for medium and 2 for high.
+#notify_urgency = 0