dotfiles/.local/bin/tools/wv

12 lines
394 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
alldata="/tmp/allfiles"
videos="/tmp/videos"
2020-12-15 13:42:59 +01:00
du -a ~/vids/* --time | awk '!($1="")' | sort -bgr | awk '!($1="")' | awk '!($1="")' | sed 's/^ //' > $alldata
2020-07-04 14:23:27 +02:00
touch $videos
2020-12-15 13:42:59 +01:00
while read -r line; do
[ -f "$line" ] && echo "$line" >> $videos
2020-07-04 14:23:27 +02:00
done <$alldata
2020-12-15 13:42:59 +01:00
dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r rifle
2020-07-04 14:23:27 +02:00
rm "$alldata"
rm "$videos"