dotfiles/.local/bin/cv

14 lines
473 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/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"