blob: 169a545aac6b1ce4aea70a28ed699c8f942956a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
#
# this script uses fp to search for file in /bin, then executes it with nohup
# and redirecting output to /dev/null (meaning terminal can be closed after
# running a program). Can be used as a lightweight and more crossplatform (can
# be ran on both X and Wayland) replacement for dmenu[1]
#
# [1] https://tools.suckless.org/dmenu/
paths=`printf '%s' "$PATH" | tr ':' ' '`
prog="`fp 10 $paths`"
[ -z "$prog" ] && exit
nohup sh -c "'$prog' &" > /dev/null 2>&1 &
while jobs | grep Running > /dev/null; do true; done
|