mirror of https://github.com/kazhala/dotbare
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
852 B
Bash
34 lines
852 B
Bash
4 years ago
|
#!/bin/bash
|
||
|
#
|
||
|
# check env variables and set default variables
|
||
|
#
|
||
|
# @params
|
||
|
# Globals
|
||
4 years ago
|
# ${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
|
||
4 years ago
|
|
||
|
[[ -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
|
||
|
"
|