diff options
-rwxr-xr-x | bin/menuscripts/mmpv | 8 | ||||
-rwxr-xr-x | bin/menuscripts/mpass-otp | 6 |
2 files changed, 14 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 diff --git a/bin/menuscripts/mpass-otp b/bin/menuscripts/mpass-otp new file mode 100755 index 0000000..b60f953 --- /dev/null +++ b/bin/menuscripts/mpass-otp @@ -0,0 +1,6 @@ +#!/bin/sh +pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -name "*.gpg" -printf '%f\n' | + sed 's/\.gpg$//' | + commander -c)" +[ "$pass" ] || exit 1 +pass otp -c keys/otp/"$pass" |