diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-03-10 02:11:44 +0100 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-03-10 02:11:44 +0100 | 
| commit | 15b19c2cc84a05c92cab26b19c172781addbe89a (patch) | |
| tree | 3cdedf203cea391726843ba0c8177e874c2ec2fc /bin/guiscripts | |
| parent | 49dd890eeb0572f3f7f0d078507a53073d1275ae (diff) | |
cleaned up dmvid
Diffstat (limited to 'bin/guiscripts')
| -rwxr-xr-x | bin/guiscripts/dmvid | 20 | 
1 files changed, 9 insertions, 11 deletions
diff --git a/bin/guiscripts/dmvid b/bin/guiscripts/dmvid index 16e164f..fe3155e 100755 --- a/bin/guiscripts/dmvid +++ b/bin/guiscripts/dmvid @@ -1,14 +1,12 @@  #!/usr/bin/env bash  find ${1:-~/vids ~/dl} 2> /dev/null | grep -E ".+\.(webm|mp4|mpeg|mkv)$" | sort > /tmp/dmvids -choice="$(\ -        sed 's|^/home/aluc|\~| ; s|\([^/]\)[^/]*/|\1/|g' /tmp/dmvids \ -		| awk '{printf "%s %s\n", NR ":", $0}' \ -        | dmenu -l 10 -g 1 -x -i \ -		| grep -zoE "^[0-9]+:" \ -)" -if [ -z "$choice" ]; then -	exit -fi -vid="$(sed -n "${choice::-1}p" /tmp/dmvids)" -mpv "$vid" + +choice="$(sed 's|^/home/aluc|\~| ; s|\([^/]\)[^/]*/|\1/|g' /tmp/dmvids |  +	awk '{printf "%s %s\n", NR ":", $0}' |  +	dmenu -l 10 -g 1 -x -i |  +	grep -zoE "^[0-9]+:")" +test -z "$choice" && +	exit 1 + +mpv "$(sed -n "${choice::-1}p" /tmp/dmvids)"  | 
