2020-07-04 14:23:27 +02:00
|
|
|
#!/bin/sh
|
2020-12-26 14:05:28 +01:00
|
|
|
videos="/tmp/videos$$"
|
2021-01-05 10:05:38 +01:00
|
|
|
du -a ~/vids/* ~/dls/* --time | awk '!($1="")' | sort -bgr -k1 | awk '!($1="")' | awk '!($1="")' | sed 's/^ //' | grep -v "$(find ~/vids/* ~/dls/* -type d | sed 's/$/\$/; s/\[/\\[/g; s/\]/\\]/g')" | sed "s|$HOME|\~|" > $videos
|
2021-01-02 10:54:22 +01:00
|
|
|
path="$(dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed "s|\~|$HOME|")"
|
2020-07-04 14:23:27 +02:00
|
|
|
rm "$videos"
|
2021-01-02 18:51:07 +01:00
|
|
|
if [ -n "$path" ];then
|
|
|
|
echo "$path" |
|
|
|
|
while read -r pathfile; do
|
|
|
|
rifle "$pathfile" &
|
|
|
|
done
|
|
|
|
fi
|