diff --git a/home/.chezmoiexternal.toml.tmpl b/home/.chezmoiexternal.toml.tmpl index 72a1c0bc..8665e905 100644 --- a/home/.chezmoiexternal.toml.tmpl +++ b/home/.chezmoiexternal.toml.tmpl @@ -74,11 +74,11 @@ type = "file" url = "https://gitlab.com/megabyte-labs/gas-station/-/raw/master/environments/prod/group_vars/all/helm.yml" refreshPeriod = "{{ $refreshPeriod }}" -[".local/share/blesh"] +[".local/share/blesh/src"] type = "git-repo" url = "https://github.com/akinomyoga/ble.sh.git" refreshPeriod = "{{ $refreshPeriod }}" - clone.args = ["--depth", "1"] + clone.args = ["--shallow-submodules", "--recursive", "--depth", "1"] pull.args = ["--ff-only"] [".local/share/bash_it"] type = "git-repo" diff --git a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl index f8931d94..91d03e65 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl @@ -23,9 +23,9 @@ if command -v powerline-daemon > /dev/null && [ -f "$BASH_IT/bash_it.sh" ]; then fi ### Ensure ble.sh installed -if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/ble.sh" ] && [ ! ]; then - logg info "${XDG_DATA_HOME:-$HOME/.local/share}/ble.sh present and ${XDG_DATA_HOME:-$HOME/.local/share}/blesh not present - installing ble.sh..." - make -C "${XDG_DATA_HOME:-$HOME/.local/share}/ble.sh" install > /dev/null && logg success "Installed ble.sh" +if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/blesh/src" ] && [ ! ]; then + logg info "${XDG_DATA_HOME:-$HOME/.local/share}/ble.sh/src present and ${XDG_DATA_HOME:-$HOME/.local/share}/blesh/src not present - installing ble.sh..." + make -C "${XDG_DATA_HOME:-$HOME/.local/share}/ble.sh/src" install > /dev/null && logg success "Installed ble.sh" fi ### Bash-it completions / plugins diff --git a/home/dot_bashrc b/home/dot_bashrc index 148b21ef..620fdf27 100644 --- a/home/dot_bashrc +++ b/home/dot_bashrc @@ -17,6 +17,9 @@ if [ -f "$HOME/.config/shell/profile.sh" ]; then . "$HOME/.config/shell/profile.sh" fi +### Ble.sh +[[ $- == *i* ]] && source "${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh" --noattach --rcfile "${XDG_DATA_CONFIG:-$HOME/.config}/blesh/bleshrc" + ### /etc/bashrc if [ -f /etc/bashrc ]; then . /etc/bashrc @@ -149,4 +152,7 @@ if [ "$BASH_SUPPORT" = 'true' ]; then if command -v zoxide > /dev/null; then eval "$(zoxide init --cmd cd bash)" > /dev/null fi + + ### Ble.sh + [[ ${BLE_VERSION-} ]] && ble-attach fi diff --git a/home/dot_config/blesh/bleshrc b/home/dot_config/blesh/bleshrc new file mode 100644 index 00000000..4df91cff --- /dev/null +++ b/home/dot_config/blesh/bleshrc @@ -0,0 +1,20 @@ +# blerc + +# If ble/contrib/integration/fzf cannot find the fzf directory, please set the +# following variable "_ble_contrib_fzf_base" manually. The value +# "/path/to/fzf-directory" should be replaced by a path to the fzf directory +# such as "$HOME/.fzf" or "/usr/share/fzf" that contain +# "shell/{completion,key-bindings}.bash" or "{completion,key-bindings}.bash". + +#_ble_contrib_fzf_base=/path/to/fzf-directory + + +# Note: If you would like to combine fzf-completion with bash_completion, you +# need to load bash_completion earlier than fzf-completion. + +#source /path/to/bash_completion.sh + + +# Setup fzf +ble-import -d integration/fzf-completion +ble-import -d integration/fzf-key-bindings \ No newline at end of file