summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-03-17 16:14:00 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-03-17 16:14:00 +0100
commit0416eae424bf4f97a346ba78015bea93b3f60db9 (patch)
tree823cc6bb215b276e68d3af4005d71d3cd6b0f5f8 /bin
parent40d5d1f8ef400d1c5cb9b8500ae13d9a456f6c67 (diff)
parent6d18189f7f1a97eb879cb55d35ab41fecb74b07b (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin')
-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 () {