diff --git a/.local/bin/tools/de b/.local/bin/tools/de index 568f784..1b8b356 100755 --- a/.local/bin/tools/de +++ b/.local/bin/tools/de @@ -6,29 +6,31 @@ shell="$(ps aux | grep $( ppid ) | head -n1 | awk '{print $11}' )" document_dirs="$HOME/bks/* $HOME/eth/* $HOME/dox/*" #force launch dmenu via cmd if [ "$1" = "launchdmenu" ]; then - file="$( du -a $document_dirs | awk '{for(i=2; i $alldata -touch $videos -while read -r line; do - [ -f "$line" ] && echo "$line" >> $videos -done <$alldata -dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed 's/^/\"/' | sed 's/$/\"/' | xargs -r rifle -rm "$alldata" +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" rm "$videos"