diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-21 23:21:36 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-21 23:21:36 +0100 |
commit | b11feb1758d79e762a8b86041123459aaa802cda (patch) | |
tree | f5ff419fd8464d98f4160e1ea323861fec907a0d /bin/menuscripts/mmpv | |
parent | 0764ed36dfbd2abd2783e422ef6b097c16584741 (diff) |
added mmpv and mpass-otp
Diffstat (limited to 'bin/menuscripts/mmpv')
-rwxr-xr-x | bin/menuscripts/mmpv | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/menuscripts/mmpv b/bin/menuscripts/mmpv new file mode 100755 index 0000000..76c0d6a --- /dev/null +++ b/bin/menuscripts/mmpv @@ -0,0 +1,8 @@ +#!/bin/sh +# Have an mpv instance that works with a socket somewhat globally +socket="/tmp/mpvsocket" +# Start mpv in idle if socket is not getting listened to +nc -zvU "$socket" || setsid mpv --input-ipc-server=/tmp/mpvsocket --idle & +file="$(PLAYER='echo' mmedia video)" +[ "$file" ] || exit 1 +echo '{ "command": ["loadfile", "'"$file"'", "append-play"] }' | nc -U /tmp/mpvsocket |