aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/.config/zsh/.zshrc9
-rw-r--r--dotfiles/.config/zsh/shortcuts16
2 files changed, 22 insertions, 3 deletions
diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc
index ad70614..a7f3000 100644
--- a/dotfiles/.config/zsh/.zshrc
+++ b/dotfiles/.config/zsh/.zshrc
@@ -71,5 +71,12 @@ zle -N zle-keymap-select
[ -f "$HOME/.cache/colorscheme" ] && trap "source $HOME/.cache/colorscheme" DEBUG
-[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] &&
+if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
+then
+ # Arch/Artix
. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+elif [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
+then
+ # Debian
+ . /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+fi
diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts
index 70041dc..8faf7c5 100644
--- a/dotfiles/.config/zsh/shortcuts
+++ b/dotfiles/.config/zsh/shortcuts
@@ -30,8 +30,20 @@ alias testinet="ping -c2 example.com"
# Fuzzy finder
alias fzo='op "$(find . -type d -path "*/\.*" -prune -o -not -name ".*" -type f | fzf)"'
-source /usr/share/fzf/completion.zsh
-source /usr/share/fzf/key-bindings.zsh
+if [ -f /usr/share/fzf/completion.zsh ]; then
+ # Arch/Artix
+ . /usr/share/fzf/completion.zsh
+elif [ -f /usr/share/doc/fzf/examples/completion.zsh ]; then
+ # Debian
+ . /usr/share/doc/fzf/examples/completion.zsh
+fi
+if [ -f /usr/share/fzf/key-bindings.zsh ]; then
+ # Arch/Artix
+ . /usr/share/fzf/key-bindings.zsh
+elif [ -f /usr/share/doc/fzf/examples/key-bindings.zsh ]; then
+ # Debian
+ . /usr/share/doc/fzf/examples/key-bindings.zsh
+fi
bindkey -r '^T'
bindkey -r '\ec'
bindkey '^F' fzf-file-widget