diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-10 09:59:32 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-10 09:59:32 +0900 |
| commit | 9afdf8d6cf4d945ac764654af75555fc767fb565 (patch) | |
| tree | 54b9a624185ddcbff720e44517f9cdcea1f35582 /ar | |
| parent | 38ec0c05c59332fbe5527ccb023ac6044fafcccd (diff) | |
modified zsh/.zshrc, modified zsh/keymaps.zsh, modified zsh/scripts.zsh
Diffstat (limited to 'ar')
| -rw-r--r-- | ar/.config/zsh/.zshrc | 16 | ||||
| -rw-r--r-- | ar/.config/zsh/keymaps.zsh | 2 | ||||
| -rw-r--r-- | ar/.config/zsh/scripts.zsh | 13 |
3 files changed, 31 insertions, 0 deletions
diff --git a/ar/.config/zsh/.zshrc b/ar/.config/zsh/.zshrc index 4126b8f..8197680 100644 --- a/ar/.config/zsh/.zshrc +++ b/ar/.config/zsh/.zshrc @@ -113,6 +113,22 @@ zstyle ':fzf-tab:*' switch-group ',' '.' # switch group using `,` and `.` [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutenvrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" + +### --- AVANTE --- ### +export AVANTE_ANTHROPIC_API_KEY="$(pass show api/claude/nvim | head -n1)" +export AVANTE_OPENAI_API_KEY="$(pass show api/chatGPT/nvim | head -n1)" +# export AVANTE_AZURE_OPENAI_API_KEY="$(pass show api/azure/nvim | head -n1)" +# export AVANTE_GEMINI_API_KEY="$(pass show api/gemini/nvim | head -n1)" +# export AVANTE_CO_API_KEY="$(pass show api/cohere/nvim | head -n1)" +# export AVANTE_AIHUBMIX_API_KEY="$(pass show api/aihubmix/nvim | head -n1)" +# export AVANTE_MOONSHOT_API_KEY="$(pass show api/moonshot/nvim | head -n1)" + + +### --- OPENAI --- ### +export OPENAI_API_KEY="$(pass show api/chatGPT/nvim | head -n1)" + + +### --- TMUX --- ### if command -v tmux >/dev/null 2>&1 && [ -z "$TMUX" ]; then terminal_count=$(pgrep -u "$USER" -ax "${TERMINAL:-st}" | grep -Ev 'ncmpcpp|newsboat|pulsemixer|spterm|splf|spcalc|stig|vimwikitodo' | wc -l) if [ "$terminal_count" -le 1 ]; then diff --git a/ar/.config/zsh/keymaps.zsh b/ar/.config/zsh/keymaps.zsh index b911502..efd9e04 100644 --- a/ar/.config/zsh/keymaps.zsh +++ b/ar/.config/zsh/keymaps.zsh @@ -164,12 +164,14 @@ if [[ -f "${ZPLUGINDIR:-${HOME}/.local/bin/zsh}/zsh-vi-mode/zsh-vi-mode.plugin.z bindkey -s '^D' '^ucdi\n' bindkey -s '^F' '^ufzffiles\n' bindkey -s '^G' '^ulf\n' + # bindkey -s '^G' '^uyazi\n' bindkey -s '^N' '^ulastnvim\n' bindkey -s '^O' '^utmo\n' bindkey -s '^P' '^ufzfpass\n' bindkey -s '^Q' '^uhtop\n' bindkey -s '^T' '^usessionizer\n' bindkey -s '^Y' '^ulfcd\n' + # bindkey -s '^Y' '^uyazicd\n' bindkey -s '^Z' '^upd\n' # bindkey -s '^_' '^u\n' diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh index e3364e8..92e10c6 100644 --- a/ar/.config/zsh/scripts.zsh +++ b/ar/.config/zsh/scripts.zsh @@ -865,3 +865,16 @@ function delete_venv() { echo "$venv deleted" fi } + + +########################################################################################### +########################################################################################### +### --- YAZI --- ### +# open yazi and cd to the file path +function yazicd() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + IFS= read -r -d '' cwd < "$tmp" + [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd" + rm -f -- "$tmp" +} |
