I use fzf with a popup terminal:
# example for i3
bindsym $mod+Return exec --no-startup-id kitty -T _menu_ -e bash -c 'ls $HOME/.local/bin/ | fzf | xargs -r -I{} i3-msg -t command exec $HOME/.local/bin/{}'
for_window [title="_menu_"] floating enable
for_window [title="_menu_"] resize set 600 800
I like this approach because it’s simple and configurable. I prefer to see only the symlinks/scripts that I put in my local bin folder, but it can easily be extended to support .desktop files, multiple folders, filtering, etc.
Ah nice! Thanks for the suggestion. Yeah
--preview
is a great feature that is good to remember.And true, it’s better to use
find -executable
than ls. Although in my case I would use-type f -o -type l
since I want to include symlinks (often I will cd into my local bin folder andln -s $(which )
to add it to my launcher). I’m using ls since I only put executables in there and using relative file paths so that it’s nicer to look at. But cd or sed would work as wellYeah the xargs + i3-msg part is a bit clunky but I’m not sure what else to do, since the terminal window needs to close immediately, which prevents the application from running. I tried a few variations with nohup and launching in the background, but haven’t found another solution. But I’m sure there’s a way