dotfiles/.local/bin/tools/wv

7 lines
375 B
Bash
Executable File

#!/bin/sh
videos="/tmp/videos$$"
du -a ~/vids/* --time | awk '!($1="")' | sort -bgr -k1 | awk '!($1="")' | awk '!($1="")' | sed 's/^ //' | grep -v "$(find ~/vids/* -type d | sed 's/$/\$/; s/\[/\\[/g; s/\]/\\]/g')" | sed "s|$HOME|\~|" > $videos
path="$(dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed "s|\~|$HOME|")"
[ -n "$path" ] && rifle "$path"
rm "$videos"