Since I already have dmenu, I use
dmenu_path to list everything in
$PATH (with the added benefit of some cache magic). You can use any other method you like.
selection=$(dmenu_path | fzf) nohup "$selection" > /dev/null 2>&1 &
Here we redirect
stdout so we can dump it all to
/dev/null. If we don’t do this, nohup will write to
$PWD/nohup.out, which is no fun.
There’s more than one way to do it.
With i3wm you can do this:
selection=$(dmenu_path | fzf) i3-msg exec "$selection"
If you enjoy stuff like this, you should check out other terminal user interface tools like
zenity. These tools let you choose from glorius full screen dialog boxes, lists, input boxes, calendars and more.
- Using FZF instead of DMENU
- fzf-dmenu - App Launcher - Linux TUI
- Uniting Interfaces: dmenu and fzf
- Why use “nohup &” rather than “exec &”