dotfiles/.local/bin/tools/wv
2020-12-15 13:42:59 +01:00

12 lines
394 B
Bash
Executable File

#!/bin/sh
alldata="/tmp/allfiles"
videos="/tmp/videos"
du -a ~/vids/* --time | awk '!($1="")' | sort -bgr | awk '!($1="")' | awk '!($1="")' | sed 's/^ //' > $alldata
touch $videos
while read -r line; do
[ -f "$line" ] && echo "$line" >> $videos
done <$alldata
dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r rifle
rm "$alldata"
rm "$videos"