remember last save directory
This commit is contained in:
parent
b1e3323c63
commit
b4f5a1515f
|
@ -1,7 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
DIRFILE="$HOME/.surf/lastsavedir"
|
||||||
|
|
||||||
|
lastdir=$(cat "$DIRFILE")
|
||||||
|
if [ -n "$lastdir" ]; then
|
||||||
|
cd "$lastdir"
|
||||||
|
fi
|
||||||
|
|
||||||
filename=$(basename -s ".html" "$1")
|
filename=$(basename -s ".html" "$1")
|
||||||
file=$(zenity --file-selection --save --filename="$filename.html")
|
file=$(zenity --file-selection --save --filename="$filename.html")
|
||||||
if [ -n "$file" ]; then
|
if [ -n "$file" ]; then
|
||||||
cat > "$file"
|
cat > "$file"
|
||||||
|
dir=$(dirname "$file")
|
||||||
|
echo "$dir" > "$DIRFILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user