mirror of https://github.com/kazhala/dotbare
set default key bindings for fzf
parent
aaf1d9c675
commit
ad454671cf
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# check env variables and set default variables
|
||||
#
|
||||
# @params
|
||||
# Globals
|
||||
# DOTBARE_DIR: string, location of the bare repo
|
||||
# DOTBARE_TREE: string, which folder is the bare repo tracking
|
||||
# DOTBARE_KEY: string, defualt key bindings
|
||||
# FZF_DEFAULT_OPTS: string, update FZF_DEFAULT_OPTS to reflect dotbare changes
|
||||
# DOTBARE_FZF_DEFAULT_OPTS: string, user custom setting for dotbare
|
||||
|
||||
[[ -z "${DOTBARE_DIR}" ]] && DOTBARE_DIR="$HOME/.cfg/"
|
||||
[[ -z "${DOTBARE_TREE}" ]] && DOTBARE_TREE="$HOME"
|
||||
if [[ -z "${DOTBARE_KEY}" ]]; then
|
||||
DOTBARE_KEY="
|
||||
--bind=alt-a:toggle-all
|
||||
--bind=alt-w:jump
|
||||
--bind=alt-0:top
|
||||
--bind=alt-o:clear-query
|
||||
--bind=alt-s:toggle-sort
|
||||
--bind=alt-t:toggle-preview
|
||||
"
|
||||
fi
|
||||
|
||||
FZF_DEFAULT_OPTS="
|
||||
$FZF_DEFAULT_OPTS
|
||||
--ansi
|
||||
--cycle
|
||||
--exit-0
|
||||
$DOTBARE_FZF_DEFAULT_OPTS
|
||||
$DOTBARE_KEY
|
||||
"
|
Loading…
Reference in New Issue