rofi: filebrowser update
This commit is contained in:
parent
fb7e7ba76e
commit
ea95fdec97
1 changed files with 7 additions and 15 deletions
|
@ -3,25 +3,16 @@ set -e
|
||||||
|
|
||||||
last_dir_file=/run/user/1000/rofi-fb.last-dir
|
last_dir_file=/run/user/1000/rofi-fb.last-dir
|
||||||
|
|
||||||
if (( ROFI_RETV == 0 ))
|
|
||||||
|
if [[ -n "$ROFI_DATA" ]] && [[ -d "$ROFI_DATA" ]]
|
||||||
then
|
then
|
||||||
# echo "first call" >&2
|
cd "$ROFI_DATA"
|
||||||
rm -f /run/user/1000/rofi-fb.last-dir
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e "$last_dir_file" ]]
|
|
||||||
then
|
|
||||||
ld="$(cat "$last_dir_file")"
|
|
||||||
# echo "change to $ld" >&2
|
|
||||||
[[ -d "$ld" ]] && cd "$ld"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -d "$1" ]]
|
if [[ -d "$1" ]]
|
||||||
then
|
then
|
||||||
cd "$1"
|
cd "$1"
|
||||||
echo "$PWD" > "$last_dir_file"
|
echo -e "\0data\x1f$(pwd)"
|
||||||
elif [[ -x "$1" ]]
|
elif [[ -x "$1" ]]
|
||||||
then
|
then
|
||||||
"$1"
|
"$1"
|
||||||
|
@ -33,6 +24,7 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ".."
|
echo -e "\0message\x1f$(pwd)"
|
||||||
ls -A
|
echo "../"
|
||||||
|
ls -A1 --file-type --group-directories-first
|
||||||
# vim:sw=4:ts=4:et:
|
# vim:sw=4:ts=4:et:
|
||||||
|
|
Loading…
Add table
Reference in a new issue