Browse Source

further cleanup / migration to zcomet

main
KemoNine 1 month ago
parent
commit
378038e03e
  1. 5
      _setup.sh
  2. 13
      fzf.zsh
  3. 44
      zshrc

5
_setup.sh

@ -20,5 +20,8 @@ ln -s $PATH_PREFIX/tmux.conf ~/.tmux.conf
rm ~/.zshrc
ln -s $PATH_PREFIX/zshrc ~/.zshrc
echo "install 'exa fd bat tmux htop nano most emacs zsh' if needed"
rm ~/.fzf.zsh
ln -s $PATH_PREFIX/fzf.zsh ~/.fzf.zsh
echo "install 'exa fd bat tmux htop nano most ripgrep emacs zsh' if needed"
echo "copy restic.sh if desired/needed"

13
fzf.zsh

@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == *~/.zcomet/repos/junegunn/fzf/bin* ]]; then
export PATH="${PATH:+${PATH}:}~/.zcomet/repos/junegunn/fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "~/.zcomet/repos/junegunn/fzf/shell/completion.zsh" 2> /dev/null
# Key bindings
# ------------
source "${HOME}/.zcomet/repos/junegunn/fzf/shell/key-bindings.zsh"

44
zshrc

@ -6,29 +6,34 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# zplug
source ~/.zplug/init.zsh
zplug "zplug/zplug", hook-build:"zplug --self-manage"
zplug "romkatv/powerlevel10k", as:theme, depth:1
#zplug "popstas/zsh-command-time"
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "ytakahashi/igit"
# zcomet install
if [[ ! -f ${ZDOTDIR:-${HOME}}/.zcomet/bin/zcomet.zsh ]]; then
command git clone https://github.com/agkozak/zcomet.git ${ZDOTDIR:-${HOME}}/.zcomet/bin
fi
# zcomit + shell line activation
source ${ZDOTDIR:-${HOME}}/.zcomet/bin/zcomet.zsh
zcomet load romkatv/powerlevel10k
# misc plugins
zcomet load zsh-users/zsh-syntax-highlighting
zcomet load ytakahashi/igit
if [[ -n "${TMUX}" ]]; then
zplug "mbenford/zsh-tmux-auto-title"
zcomet load mbenford/zsh-tmux-auto-title
fi
#zplug "MichaelAquilina/zsh-you-should-use"
zplug "junegunn/fzf", from:github, as:command, rename-to:fzf, hook-build:"./install --all"
zplug "junegunn/fzf", use:"shell/*.zsh", defer:2
zplug "Aloxaf/fzf-tab", from:github
zplug "alexiszamanidis/zsh-git-fzf"
#zplug "ddnexus/fm", hook-build:"./fm__compile"
zplug "larkery/zsh-histdb"
#zplug "m42e/zsh-histdb-fzf"
zplug 'm42e/zsh-histdb-skim', from:github, at:main
# fzf
zcomet load junegunn/fzf shell completion.zsh key-bindings.zsh
(( ${+commands[fzf]} )) || ~[fzf]/install --bin
zcomet load Aloxaf/fzf-tab
#zcomet load ddnexus/fm
# history
zcomet load larkery/zsh-histdb
zcomet load m42e/zsh-histdb-skim
zplug load
# Run compinit and compile its cache
zcomet compinit
# zsh options
autoload run-help
@ -59,7 +64,6 @@ setopt append_history
setopt share_history
# zsh plugin options
#ZSH_COMMAND_TIME_MIN_SECONDS=10
if [[ -n "${TMUX}" ]]; then
ZSH_TMUX_AUTO_TITLE_SHORT=true
ZSH_TMUX_AUTO_TITLE_IDLE_TEXT="%last"

Loading…
Cancel
Save