commit - 7831b2b93a45651ccb1011cb2d5bdcf4ad55c77e
commit + 8e8d313ede4b495b4ac31f6c23e1bd8065ee29ae
blob - 1efa5bc6a1b6edddaa7e63ace104a534f2cbf7a4
blob + ef08638c5fe3ab94bf27709434c03668be0ac50c
--- README.md
+++ README.md
`~/storage`.
amused-web works and can be used to control the playback, but as amused
-doesn't respond to the events (notifications, calls, headsets buttons,
-other apps playing music, etc...) it's not particularly handy to be
-used.
+doesn't respond to the events (calls, headsets buttons, other apps
+playing music, etc...) it's not particularly handy to be used.
+contrib/amused-termux-notification shows a persistent notification with
+the song file name and buttons to control the playback, making slightly
+more nicer to use amused on android.
+
[oboe]: https://github.com/google/oboe/
[termux]: https://termux.dev/en/
blob - /dev/null
blob + d13ab617ce8686505062ca55c08188dcab38b61c (mode 644)
--- /dev/null
+++ contrib/amused-termux-notification
+#!/bin/sh
+
+# XXX
+amused="$HOME/bin/amused -s $HOME/amused.sock"
+
+notify() {
+ path="$($amused status -f path)"
+ base="${path##*/}"
+ name="${base%.*}"
+
+ termux-notification -i amused --ongoing -t "$name" -c "$path" \
+ --type media \
+ --media-next "$amused next" \
+ --media-pause "$amused pause" \
+ --media-play "$amused play" \
+ --media-previous "$amused prev"
+}
+
+notify
+$amused monitor jump,next,pause,play,prev,stop | while read line; do
+ notify
+done