dotfiles/.local/bin/tools/wv

12 lines
401 B
Bash
Executable File

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