sway-launcher-desktop icon indicating copy to clipboard operation
sway-launcher-desktop copied to clipboard

Swap to upside down/reversed output

Open steveb-123 opened this issue 2 years ago • 2 comments

The default output, with the prompt at the bottom feels unexpected to me. After a week of use I'm still looking up for a moment first.

Is there any straightforward way to reverse, or otherwise customise the order of the output?

I want to switch so that the prompt is at the top and the search list order shows the best match at the top.

Apologies if I missed something, I glanced through the .sh but it didn't leap out at me. I appreciate the simplicity of the project so I understand that this might be out of its scope or annoying to implement.

Thanks!

steveb-123 avatar Oct 19 '21 10:10 steveb-123

This should be possible by invoking fzf with the proper arguments as described here.

The real question is what's the best way to pass these arguments from the launcher. There's another issue that explores a generic way to pass fzf arguments into the launcher which is probably preferable to single-purpose flags for things like reversing the layout. I will link to the issue when I am back at my PC

Biont avatar Oct 19 '21 13:10 Biont

Thanks for the pointer ...I didn't realise this was all just coming straight out of fzf!

Adding --reverse and removing the preview lines in that section got it to how I like it.

It would be worth including some generic way to remove or alter default included flags as well as adding them.

For any cut n pasters, here is the edited section...

readarray -t COMMAND_STR <<<$(
  fzf --ansi +s -x -d '\034' --nth ..3 --with-nth 3 \
    --print-query \
    --reverse \
    --no-multi --cycle \
    --prompt="${GLYPH_PROMPT-# }" \
    --header='' --no-info --margin='1,2' \
    --color='16,gutter:-1' \
    <"$FZFPIPE"
) || exit 1

Thanks!

steveb-123 avatar Oct 19 '21 13:10 steveb-123