diff --git a/zprofile b/zprofile index 6aa2d83..d11d8b5 100644 --- a/zprofile +++ b/zprofile @@ -1,3 +1,12 @@ export PATH="$PATH:/home/livie/.cargo/bin" # Created by `pipx` on 2023-06-17 16:56:49 export PATH="$PATH:/home/livie/.local/bin" + +# input method +if command -v fcitx5 >/dev/null 2>&1; then + export GTK_IM_MODULE=fcitx + export QT_IM_MODULE=fcitx + export XMODIFIERS=@im=fcitx + export SDL_IM_MODULE=fcitx + export GLFW_IM_MODULE=ibus +fi diff --git a/zshrc b/zshrc index 9267744..6e93320 100644 --- a/zshrc +++ b/zshrc @@ -24,15 +24,6 @@ command -v bat >/dev/null 2>&1 && alias cat='bat' powerline-daemon -q . /usr/share/powerline/bindings/zsh/powerline.zsh -# input method -if command -v fcitx5 >/dev/null 2>&1; then - export GTK_IM_MODULE=fcitx - export QT_IM_MODULE=fcitx - export XMODIFIERS=@im=fcitx - export SDL_IM_MODULE=fcitx - export GLFW_IM_MODULE=ibus -fi - # The following lines were added by compinstall zstyle ':completion:*' completer _complete _ignored @@ -48,9 +39,28 @@ HISTSIZE=1000 SAVEHIST=10000 setopt nomatch notify unsetopt autocd beep extendedglob -bindkey -v +bindkey -e # End of lines configured by zsh-newuser-install # Created by `pipx` on 2023-06-17 16:56:49 export PATH="$PATH:/home/livie/.local/bin" + +# fzf autocompletion +if command -v fzf >/dev/null 2>&1; then + source /usr/share/fzf/key-bindings.zsh + source /usr/share/fzf/completion.zsh +fi + +# fzf opts +#export FZF_COMPLETION_OPTS='' + +# fd use for fzf +_fzf_compgen_path() { + fd --hidden --follow --exclude ".git" . "$1" +} + +_fzf_compgen_dir() { + fd --type d --hidden --follow ^^exclude ".git" . "$1" +} +