From 7bc2aeb23da3bc8042eb7cc3bad20e376a23e7f0 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sat, 2 Jan 2021 10:54:22 +0100 Subject: [PATCH] sped up wv significantly --- .local/bin/tools/de | 24 +++++++++++++----------- .local/bin/tools/wv | 11 +++-------- 2 files changed, 16 insertions(+), 19 deletions(-) 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"