toggle
authorMart Lubbers <mart@martlubbers.net>
Thu, 27 Jul 2023 12:29:10 +0000 (14:29 +0200)
committerMart Lubbers <mart@martlubbers.net>
Thu, 27 Jul 2023 12:29:10 +0000 (14:29 +0200)
music/.local/bin/music_toggle
vim/.vim/pack/plugins/start/vimwiki [new submodule]

index eaddd60..5cb654f 100755 (executable)
@@ -8,6 +8,12 @@ then
 elif cmus-remote -Q
 then
        cmus-remote --pause
+elif dbus-send --session --dest=org.freedesktop.DBus --type=method_call \
+               --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames\
+               | grep -q "org\.mpris\.MediaPlayer2\.spotify"
+then
+       dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify\
+               /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
 else
        echo "$(date) $0: no music player detected"
 fi
diff --git a/vim/.vim/pack/plugins/start/vimwiki b/vim/.vim/pack/plugins/start/vimwiki
new file mode 160000 (submodule)
index 0000000..619f04f
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 619f04f89861c58e5a6415a4f83847752928252d