From eaebd0212d70271f2ac8e3e34e6a7afe2d7c7d24 Mon Sep 17 00:00:00 2001 From: luukvbaal <31730729+luukvbaal@users.noreply.github.com> Date: Thu, 4 Nov 2021 14:58:21 +0100 Subject: [PATCH] Updated Advanced use cases (markdown) --- Advanced-use-cases.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Advanced-use-cases.md b/Advanced-use-cases.md index 9cfa39a..6bddbe3 100644 --- a/Advanced-use-cases.md +++ b/Advanced-use-cases.md @@ -132,11 +132,13 @@ To use `nnn` as the file picker dialog for chromium browsers, create a script `k #!/bin/sh while :; do case $1 in --getsavefilename) file="$2" break ;; + --version) printf ""; exit ;; --*) shift ;; *) 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" + ``` 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.