dotfiles/.local/bin/tools/wv

12 lines
421 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
alldata="/tmp/allfiles"
videos="/tmp/videos"
du -a ~/vids/* --time | sort -u | 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 | sort -u | dmenu -i -l 30 -p "Choose a video to watch:" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r xdg-open
2020-07-04 14:23:27 +02:00
rm "$alldata"
rm "$videos"