#[SOLVED] fzf as app launcher - Can't pass arguments to executed commands

8 messages · Page 1 of 1 (latest)

sacred hull
#

Title. For example, launching alacritty works as expected, but attempting to use alacritty -e cava just exits fzf, without launching anything.
fzf launch arguments from my sway config are as follows:

set $menu alacritty --class 'launcher' --command bash -c 'compgen -c | sort -u | fzf --no-info | xargs -r swaymsg -t command exec'

Is there something I'm missing here?

red eagle
#

Maybe you should try asking on the fzf github, this isn't really about Arch.

#

They could probably help you a lot more I would reckon.

vocal cedar
#

alacritty --class tpop -o "window.dimensions.lines=9" "window.dimensions.columns=30" -e sh -c "fpath | fzf --reverse --info=hidden --no-scrollbar --bind=enter:replace-query+print-query > $XDG_RUNTIME_DIR/frun"

#

This part achieves what you want:
--bind=enter:replace-query+print-query

#

Works just like dmenu.
If there is a selection available, it runs the top selection with a partial query.
If you write the full command with parameters and stuff, there is no longer a selection left in the list, and it instead runs the query you entered.

#

Like this

sacred hull