diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-03-12 16:19:34 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-03-12 16:23:00 +0530 |
commit | 69aeeb51d249736c37ea6aa095be4ffb020731d8 (patch) | |
tree | 3e08ffa91eaef27b07d8249678c598dbaf718d08 /user-scripts | |
parent | 99c1bdd2b7985483d097ddcb15e167e8a67bdb0f (diff) | |
download | nnn-69aeeb51d249736c37ea6aa095be4ffb020731d8.tar.gz |
GUI app launcher with drop-down menu
`nlauncher` is POSIX compliant. It needs `fzy`.
Diffstat (limited to 'user-scripts')
-rwxr-xr-x | user-scripts/nlaunch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/user-scripts/nlaunch b/user-scripts/nlaunch new file mode 100755 index 0000000..79540c8 --- /dev/null +++ b/user-scripts/nlaunch @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +# Description: Fuzzy find executables in $PATH and launch an application +# stdin, stdout, stderr are suppressed so CLI utilities exit silently +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +IFS=':' + +get_selection() { + ls -H $PATH | sort | fzy +} + +if selection=$( get_selection ); then + "$selection" 2>&1 >/dev/null & +fi |