summaryrefslogtreecommitdiff
path: root/dmpv
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-08-30 09:40:41 -0500
committerzachir <zachir@librem.one>2025-08-30 09:40:41 -0500
commita26e6ae5253d95e7238dab20e298129a468e04f6 (patch)
tree859d057fa005024b4241a546b86713fafe9963b0 /dmpv
parentb3954287e7d50d744da3221677c89e108cff36c4 (diff)
Improve dmenu support
You can now (again) pass multiple flags to dmenu through -d flags, as well as for some scripts all args are passed to dmenu.
Diffstat (limited to 'dmpv')
-rwxr-xr-xdmpv13
1 files changed, 7 insertions, 6 deletions
diff --git a/dmpv b/dmpv
index dc98c80..bf5ed51 100755
--- a/dmpv
+++ b/dmpv
@@ -12,7 +12,7 @@ esac
playvid () {
while true; do
- VIDEO=$(find "$HOME/Videos" | uniq | dmenu -l 15)
+ VIDEO=$(find "$HOME/Videos" | uniq | dmenu -l 15 "$@")
[ -z "$VIDEO" ] && exit
if [ "$VIDEO" = "." ]; then
break;
@@ -25,19 +25,20 @@ playvid () {
}
printhelp () {
- printf "Usage: dmpv [-l] [-h]\n"
printf "dmpv is a simple dmenu interface for playing content with mpv\n"
+ printf "dmpv [-l] [-h]\n"
printf "dmpv assumes videos are stored in ~/Videos\n"
- printf " -h\t\tprint this help message\n"
- printf " -l\t\trun the prompt again after mpv exits\n"
+ printf "\tFlags are passed to dmenu\n"
+ printf "\t-h\t\tprint this help message\n"
+ printf "\t-l\t\trun the prompt again after mpv exits\n"
}
if [ -n "$HELP" ]; then
printhelp && exit 0
elif [ -n "$LOOP" ]; then
while true; do
- playvid || exit 0
+ playvid "$@" || exit 0
done
else
- playvid
+ playvid "$@"
fi