12 lines
444 B
Bash
Executable File
12 lines
444 B
Bash
Executable File
#!/bin/sh
|
|
videos="/tmp/videos$$"
|
|
du -a ~/vids/* --time | awk '!($1="")' | sort -bgr -k1 | awk '!($1="")' | awk '!($1="")' | sed 's/^ //' | grep -v "$(find ~/vids/* -type d | sed 's/$/\$/; s/\[/\\[/g; s/\]/\\]/g')" | sed "s|$HOME|\~|" > $videos
|
|
path="$(dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed "s|\~|$HOME|")"
|
|
rm "$videos"
|
|
if [ -n "$path" ];then
|
|
echo "$path" |
|
|
while read -r pathfile; do
|
|
rifle "$pathfile" &
|
|
done
|
|
fi
|