14 lines
473 B
Plaintext
14 lines
473 B
Plaintext
|
#!/bin/sh
|
||
|
source $HOME/.config/aliasrc
|
||
|
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
|
||
|
choice=$( cat $videos | dmenu -i -l 50 -p "Choose a video to watch:" )
|
||
|
[ -n "$choice" ] && st mkchromecast --video --control -i "$choice"
|
||
|
rm -f "$alldata"
|
||
|
rm -f "$videos"
|