dotfiles/.local/bin/tools/wv

7 lines
375 B
Plaintext
Raw Normal View History

2020-07-04 14:23:27 +02:00
#!/bin/sh
2020-12-26 14:05:28 +01:00
videos="/tmp/videos$$"
2021-01-02 10:54:22 +01:00
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|")"
[ -n "$path" ] && rifle "$path"
2020-07-04 14:23:27 +02:00
rm "$videos"