Skip to content

Commit

Permalink
Merge pull request #7 from kevintraver/feature-fzf-layout
Browse files Browse the repository at this point in the history
Add fzf layout option
  • Loading branch information
roosta committed Dec 20, 2021
2 parents f8521dd + a85e55f commit 60c9f3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ You can set the popup size with this option.
set -g @fuzzback-popup-size '90%'
```

### fzf layout

You can reverse the direction of fzf by setting this variable. The default is `default`

```tmux
set -g @fuzzback-fzf-layout 'reverse'
```

### fzf bind

If you want to bind some keybinding using fzf --bind that's only used in
Expand Down
3 changes: 3 additions & 0 deletions scripts/fuzzback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fzf_split_cmd() {
--no-multi \
--no-sort \
--no-preview \
--layout="$fzf_layout" \
--print-query

}
Expand All @@ -35,6 +36,7 @@ fzf_popup_cmd() {
--no-multi \
--no-sort \
--no-preview \
--layout="$fzf_layout" \
--print-query
}

Expand Down Expand Up @@ -260,6 +262,7 @@ fuzzback() {
enable_popup="$(tmux_get '@fuzzback-popup' 0)"
popup_size="$(tmux_get '@fuzzback-popup-size' "50%")"
fzf_bind="$(tmux_get '@fuzzback-fzf-bind' 'ctrl-y:accept')"
fzf_layout="$(tmux_get '@fuzzback-fzf-layout' 'default')"

pos=$(get_pos)
pane_height="$(tmux display-message -p '#{pane_height}')"
Expand Down

0 comments on commit 60c9f3d

Please sign in to comment.