summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc59
1 files changed, 55 insertions, 4 deletions
diff --git a/.zshrc b/.zshrc
index 337cff8..33564e0 100644
--- a/.zshrc
+++ b/.zshrc
@@ -5,8 +5,8 @@ setopt incappendhistory
setopt interactivecomments
HISTFILE=~/.zsh_history
-HISTSIZE=5000
-SAVEHIST=5000
+HISTSIZE=10000
+SAVEHIST=10000
bindkey -v
export KEYTIMEOUT=1
@@ -48,13 +48,13 @@ alias pdf='sioyek'
alias wiki='wikiman'
alias lg='lazygit'
alias blue='bluetui'
-alias wifi='impala'
+alias op='xdg-open'
+alias open='xdg-open'
bindkey -M vicmd 'jj' vi-cmd-mode
bindkey -M viins 'jj' vi-cmd-mode
-
function zle-keymap-select {
if [[ $KEYMAP == vicmd ]]; then
echo -ne "\e[1 q"
@@ -100,3 +100,54 @@ export QT_QPA_PLATFORM=wayland
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/cli/sf/bin:$HOME/.platformio/penv/bin:$HOME/scripts"
. "$HOME/.local/bin/env"
+
+# _fzf_search() {
+# local base_dir=$1
+# local type=$2
+# local mode=$3
+#
+# if [[ "$mode" == "ripgrep" ]]; then
+# local res=$(rg --column --line-number --no-heading --color=always --smart-case "" "$base_dir" | \
+# fzf --ansi --delimiter : --preview 'bat --style=numbers --color=always --highlight-line {2} {1}')
+# [[ -n "$res" ]] && nvim $(echo $res | cut -d: -f1) +$(echo $res | cut -d: -f2)
+# else
+# local res=$(fd --type "$type" . "$base_dir" | fzf --preview '[[ -d {} ]] && eza -T {} || bat --color=always {}')
+# if [[ -n "$res" ]]; then
+# if [[ "$type" == "d" ]]; then
+# cd "$res"
+# else
+# nvim "$res"
+# fi
+# fi
+# fi
+# zle reset-prompt
+# }
+#
+# fzf_here_f() { _fzf_search . f }
+# fzf_here_d() { _fzf_search . d }
+# fzf_here_rg() { _fzf_search . "" ripgrep }
+# fzf_home_f() { _fzf_search ~ f }
+# fzf_home_d() { _fzf_search ~ d }
+# fzf_home_rg() { _fzf_search ~ "" ripgrep }
+# fzf_root_f() { _fzf_search / f }
+# fzf_root_g() { _fzf_search / d }
+#
+# zle -N fzf_here_f
+# zle -N fzf_here_d
+# zle -N fzf_here_rg
+# zle -N fzf_home_f
+# zle -N fzf_home_d
+# zle -N fzf_home_rg
+# zle -N fzf_root_f
+# zle -N fzf_root_g
+#
+# bindkey '^j' fzf_here_f
+# bindkey '^g' fzf_here_d
+# bindkey '^k' fzf_here_rg
+#
+# bindkey '^@j' fzf_home_f
+# bindkey '^@g' fzf_home_d
+# bindkey '^@k' fzf_home_rg
+#
+# bindkey '^[^@j' fzf_root_f
+# bindkey '^[^@g' fzf_root_g