diff options
author | 2019-06-16 22:21:13 +0530 | |
---|---|---|
committer | 2019-06-17 07:04:42 +0530 | |
commit | 794a0e27091b63f997fc829d0288cde5a4a2edbd (patch) | |
tree | 384695218b8cf09700df81715627004124e0edf7 /scripts/nlaunch | |
parent | aa56b99326a12f5bbab6d5a693755060e81e44a2 (diff) | |
download | nnn-794a0e27091b63f997fc829d0288cde5a4a2edbd.tar.gz |
Move scripts to misc
Diffstat (limited to 'scripts/nlaunch')
-rw-r--r-- | scripts/nlaunch/README.md | 7 | ||||
-rwxr-xr-x | scripts/nlaunch/nlaunch | 29 |
2 files changed, 0 insertions, 36 deletions
diff --git a/scripts/nlaunch/README.md b/scripts/nlaunch/README.md deleted file mode 100644 index 2b267ee..0000000 --- a/scripts/nlaunch/README.md +++ /dev/null @@ -1,7 +0,0 @@ -`nlaunch` is an independent POSIX-compliant GUI application launcher shell script. To use it with `nnn` you need to mark the file executable and drop it somewhere in your `$PATH`. - -It requires [`fzy`](https://github.com/jhawthorn/fzy) to show a fuzzy drop-down menu. - -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 deleted file mode 100755 index 123e62d..0000000 --- a/scripts/nlaunch/nlaunch +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env sh - -# Description: Fuzzy find executables in $PATH and launch an application. -# stdin, stdout, stderr are suppressed so CLI utilities exit silently. -# Works as an independent app launcher. -# -# Requires fzy. -# -# Usage: nlaunch [delay] -# delay is in seconds, if omitted nlaunch waits for 1 sec -# -# Shell: POSIX compliant -# Author: Arun Prakash Jana - -IFS=':' - -get_selection() { - ls -H $PATH | sort | fzy -} - -if selection=$( get_selection ); then - setsid "$selection" 2>/dev/null 1>/dev/null & - - if ! [ -z "$1" ]; then - sleep "$1" - else - sleep 1 - fi -fi |