Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
560 B

#!/bin/sh
for ((i=1;i<=$#;i++));
do
if [ ${!i} = "--getsavefilename" ]
then ((i++))
filename=${!i};
fi
if [ ${!i} = "--version" ]
then
echo "someversion"
exit
fi
done;
path=$( echo ${filename%/*} )
file=$( echo ${filename##/*/} )
rm /tmp/lf-chrome-choosed
st -c lf -n lf -e $HOME/.local/bin/lf-ueberzug --selection-path=/tmp/lf-chrome-choosed
selected=$(cat /tmp/lf-chrome-choosed 2> /dev/null)
if [ ! $? = 0 ]
then
exit 1
fi
if [ -d $selected ]
then
echo "$selected$file"
else
echo $selected
fi