summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra')
-rwxr-xr-xbin/extra/myts8
-rwxr-xr-xbin/extra/trl10
2 files changed, 13 insertions, 5 deletions
diff --git a/bin/extra/myts b/bin/extra/myts
index aea4842..97a889d 100755
--- a/bin/extra/myts
+++ b/bin/extra/myts
@@ -33,7 +33,7 @@ fi
q="$@"
if [ -z "$q" ]; then
- >&2 printf 'Usage: %s query\n' "$0"
+ >&2 printf 'Usage: %s [-nm] query\n' "$0"
exit 1
fi
@@ -56,10 +56,10 @@ rm -f "$tsv" "$json"
if [ "$toMPDFlag" ]; then
>&2 printf 'Adding to mpd..\n'
- mpc add "$(yt-dlp --prefer-insecure -g -f140 "$url")"
+ mpc --no-resume-playback add "$(yt-dlp --prefer-insecure -g -f140 "$url")"
elif [ "$noVideoFlag" ]; then
- mpv --no-video "$url"
+ mpv --no-resume-playback --no-video "$url"
else
- mpv "$url"
+ mpv --no-resume-playback "$url"
fi
>&2 printf 'Done.\n'
diff --git a/bin/extra/trl b/bin/extra/trl
index 957d0fb..4a27f6a 100755
--- a/bin/extra/trl
+++ b/bin/extra/trl
@@ -1,7 +1,15 @@
#!/bin/sh
# Translate words using http://context.reverso.net and scraping the answers
-# with 'pup' and 'curl'.
+
+for dependency in pup curl fzf
+do
+ if ! command -v "$dependency" > /dev/null
+ then
+ >&2 printf '"%s" (dependency) could not be found.\n' "$dependency"
+ exit 1
+ fi
+done
# returns available languages
languages () {