diff options
author | 2019-04-28 20:48:14 +0530 | |
---|---|---|
committer | 2019-05-22 08:44:19 +0530 | |
commit | ee11e78f14a5375994d53e2420dacfdcde2d4122 (patch) | |
tree | 6e9658f39388767365dcce4285d8229a5de9f14b /scripts | |
parent | a5c5fc97e27665d9bda36709fb0e2c19a76af332 (diff) | |
download | nnn-ee11e78f14a5375994d53e2420dacfdcde2d4122.tar.gz |
nlaunch: add sleep to wait for child
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nlaunch/README.md | 4 | ||||
-rwxr-xr-x | scripts/nlaunch/nlaunch | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/scripts/nlaunch/README.md b/scripts/nlaunch/README.md index ef59d18..8268bb3 100644 --- a/scripts/nlaunch/README.md +++ b/scripts/nlaunch/README.md @@ -1 +1,5 @@ `nlaunch` is an independent POSIX-compliant GUI application launcher shell script. Its only dependency is `fzy`. It's possible to set a keyboard shortcut to open `nlaunch` in a terminal and use it as the regular launcher. + +To use `nlaunch` as an independent launcher add a keybind to open `nlaunch` in a terminal e.g. + + xfce4-terminal -e nlaunch diff --git a/scripts/nlaunch/nlaunch b/scripts/nlaunch/nlaunch index e5b0a7b..123e62d 100755 --- a/scripts/nlaunch/nlaunch +++ b/scripts/nlaunch/nlaunch @@ -6,6 +6,9 @@ # # Requires fzy. # +# Usage: nlaunch [delay] +# delay is in seconds, if omitted nlaunch waits for 1 sec +# # Shell: POSIX compliant # Author: Arun Prakash Jana @@ -17,4 +20,10 @@ get_selection() { if selection=$( get_selection ); then setsid "$selection" 2>/dev/null 1>/dev/null & + + if ! [ -z "$1" ]; then + sleep "$1" + else + sleep 1 + fi fi |