sped up wv
This commit is contained in:
parent
79c9a24006
commit
72444b3847
@ -1,16 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
ppid () { ps -p ${1:-$$} -o ppid=; }
|
|
||||||
shell="$(ps aux | grep $( ppid ) | head -n1 | awk '{print $11}' )"
|
|
||||||
videos="/tmp/videos$$"
|
videos="/tmp/videos$$"
|
||||||
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
|
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|")"
|
path="$(dmenu -i -l 30 -p "Choose a video to watch:" <"$videos" | sed "s|\~|$HOME|")"
|
||||||
if [ ! "$shell" = "/bin/sh" ]; then
|
|
||||||
[ -n "$path" ] && rifle "$path"
|
|
||||||
else
|
|
||||||
if rifle -l "$path" | head -n1 | grep -q 'EDITOR';then
|
|
||||||
st rifle "$path"
|
|
||||||
else
|
|
||||||
rifle "$path"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
rm "$videos"
|
rm "$videos"
|
||||||
|
if [ -n "$path" ];then
|
||||||
|
echo "$path" |
|
||||||
|
while read -r pathfile; do
|
||||||
|
rifle "$pathfile" &
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user