12 lines
394 B
Bash
Executable File
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"
|