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
|
||||
|
||||
if (( ROFI_RETV == 0 ))
|
||||
|
||||
if [[ -n "$ROFI_DATA" ]] && [[ -d "$ROFI_DATA" ]]
|
||||
then
|
||||
# echo "first call" >&2
|
||||
rm -f /run/user/1000/rofi-fb.last-dir
|
||||
cd "$ROFI_DATA"
|
||||
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" ]]
|
||||
then
|
||||
cd "$1"
|
||||
echo "$PWD" > "$last_dir_file"
|
||||
echo -e "\0data\x1f$(pwd)"
|
||||
elif [[ -x "$1" ]]
|
||||
then
|
||||
"$1"
|
||||
|
@ -33,6 +24,7 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo ".."
|
||||
ls -A
|
||||
echo -e "\0message\x1f$(pwd)"
|
||||
echo "../"
|
||||
ls -A1 --file-type --group-directories-first
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
|
Loading…
Add table
Reference in a new issue