Updated Advanced use cases (markdown)

luukvbaal 2021-11-05 15:37:14 +01:00
parent eaebd0212d
commit c862d4c066
1 changed files with 2 additions and 2 deletions

@ -137,11 +137,11 @@ while :; do case $1 in
*) break ;;
esac done
file="${file##/*/}"
st -c picker sh -c "nnn -S -s picker -p - | awk '{ print system(\"[ -d \" \$0 \" ]\") ? \$0: \$0\"/${file##/*/}\" }' > /proc/$$/fd/1"
st -c picker sh -c "nnn -JS -s picker -p - | awk '{ print system(\"[ -d \" \$0 \" ]\") ? \$0: \$0\"/${file##/*/}\" }' > /proc/$$/fd/1"
```
This example sets the class for `st` to `picker` and `nnn` uses a named session `picker`. This allows you to for example have the picker window float by default in your window manager and `nnn` remembers where your previous "Save as..." target was. Replace with your preferred terminal and `nnn` options if applicable.
This example sets the class for `st` to `picker` and `nnn` uses a named session `picker`. This allows you to for example have the picker window float by default in your window manager and `nnn` remembers where your previous "Save as..." target was. The `-J` option makes sure that the saved session saves the cursor position on the selected file/directory. Replace with your preferred terminal and `nnn` options if applicable.
Then create a browser wrapper that launches your browser with `XDG_CURRENT_DESKTOP=KDE`:
```sh