From a26e6ae5253d95e7238dab20e298129a468e04f6 Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 30 Aug 2025 09:40:41 -0500 Subject: 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. --- dmpv | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'dmpv') 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 -- cgit v1.2.3