wfxr / tmux-fzf-url

🚀 Quickly open urls on your terminal screen!
Other
526 stars 42 forks source link

feat: allow to set fzf options with tmux option @fzf-url-fzf-options #16

Closed nifr closed 3 years ago

nifr commented 3 years ago

Hi @wfxr , first of all THANK YOU so much for this awesome plugin.

I'm using it every day and it really improves my productivity :)

This PR enables passing custom options to fzf-tmux using the tmux option @fzf-url-fzf-options. It gracefully retains the original behaviour if the variable is unset.

The tmux option@fzf-url-fzf-options is read on invocation of fzf-url.sh.

This allows to set the variable in your .tmux.conf or update it on-the-fly as follows:

tmux set -g '@fzf-url-fzf-options' \
  '-w 100% -y 100% --no-preview --layout reverse --multi -0 --prompt "url:  " --no-info --pointer ● --color "gutter:-1,pointer:#00ff00"'

The resulting tmux popup (tmux 3.2+) looks like this:

Screenshot 2021-06-01 at 20 42 34

h0adp0re commented 3 years ago

This is great work. Perhaps document @fzf-url-fzf-options as well?

nifr commented 3 years ago

This is great work. Perhaps document @fzf-url-fzf-options as well?

Done.

h0adp0re commented 3 years ago

Awesome, I trust @wfxr will find this satisfactory.

nifr commented 3 years ago

Added missing --no-border --no-preview fzf options to the README.md.

I'll be happy to see this PR get merged after review by @wfxr 👍

wfxr commented 3 years ago

@nifr LGTM! Good design and and nice documentation :+1:.

Thanks you for the contribution! Thanks also to @h0adp0re for the review!