Fix Yazi shell integration and enhance Kitty configuration
**Yazi Integration Fixes:** - Fixed y() function in .zshrc to prevent shell exit when quitting Yazi - Updated kitty-yazi.sh script to use AppleScript for proper tab creation - Script now focuses existing Kitty window and creates new tab instead of new window **Kitty Configuration Enhancements:** - Added advanced font rendering with ligature support - Improved cursor animations and visual effects - Enhanced tab bar with powerline styling and fade effects - Added background blur and better transparency handling - Optimized performance settings (rendering delays, scrolling) - Added comprehensive keyboard shortcuts for window/tab management - Improved URL handling and text selection features - Added notification system for long-running commands 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
47
kitty/current-theme.conf
Normal file
47
kitty/current-theme.conf
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
background #3b3c35
|
||||||
|
foreground #fdfff1
|
||||||
|
|
||||||
|
cursor #fdfff1
|
||||||
|
cursor_text_color #000000
|
||||||
|
selection_foreground #3b3c35
|
||||||
|
selection_background #fdfff1
|
||||||
|
|
||||||
|
# dull black
|
||||||
|
color0 #3b3c35
|
||||||
|
# light black
|
||||||
|
color8 #6e7066
|
||||||
|
|
||||||
|
# dull red
|
||||||
|
color1 #f82570
|
||||||
|
# light red
|
||||||
|
color9 #f82570
|
||||||
|
|
||||||
|
# dull green
|
||||||
|
color2 #a6e12d
|
||||||
|
# light green
|
||||||
|
color10 #a6e12d
|
||||||
|
|
||||||
|
# yellow
|
||||||
|
color3 #e4db73
|
||||||
|
# light yellow
|
||||||
|
color11 #e4db73
|
||||||
|
|
||||||
|
# blue
|
||||||
|
color4 #fc961f
|
||||||
|
# light blue
|
||||||
|
color12 #fc961f
|
||||||
|
|
||||||
|
# magenta
|
||||||
|
color5 #ae81ff
|
||||||
|
# light magenta
|
||||||
|
color13 #ae81ff
|
||||||
|
|
||||||
|
# cyan
|
||||||
|
color6 #66d9ee
|
||||||
|
# light cyan
|
||||||
|
color14 #66d9ee
|
||||||
|
|
||||||
|
# dull white
|
||||||
|
color7 #fdfff1
|
||||||
|
# bright white
|
||||||
|
color15 #fdfff1
|
||||||
56
kitty/keymap.conf
Normal file
56
kitty/keymap.conf
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
map cmd+1 goto_tab 1
|
||||||
|
map cmd+2 goto_tab 2
|
||||||
|
map cmd+3 goto_tab 3
|
||||||
|
map cmd+4 goto_tab 4
|
||||||
|
map cmd+5 goto_tab 5
|
||||||
|
map cmd+6 goto_tab 6
|
||||||
|
map cmd+7 goto_tab 7
|
||||||
|
map cmd+8 goto_tab 8
|
||||||
|
map cmd+9 goto_tab 9
|
||||||
|
|
||||||
|
map ctrl+tab next_window
|
||||||
|
map ctrl+shift+left resize_window narrower
|
||||||
|
map ctrl+shift+right resize_window wider
|
||||||
|
map ctrl+shift+up resize_window taller
|
||||||
|
map ctrl+shift+down resize_window shorter 3
|
||||||
|
map ctrl+left neighboring_window left
|
||||||
|
map ctrl+down neighboring_window down
|
||||||
|
map ctrl+shift+] next_tab
|
||||||
|
map ctrl+shift+[ previous_tab
|
||||||
|
|
||||||
|
# Window Management
|
||||||
|
map ctrl+shift+r rotate_windows
|
||||||
|
map ctrl+shift+l toggle_layout tall
|
||||||
|
map ctrl+enter launch --cwd=current
|
||||||
|
map ctrl+shift+enter launch --type=tab --cwd=current
|
||||||
|
map ctrl+shift+f toggle_fullscreen
|
||||||
|
map ctrl+shift+u input_unicode_character
|
||||||
|
|
||||||
|
# Reset window sizes
|
||||||
|
map ctrl+home resize_window reset
|
||||||
|
|
||||||
|
# Text Selection & Search
|
||||||
|
map ctrl+shift+f show_scrollback
|
||||||
|
map ctrl+shift+h show_last_command_output
|
||||||
|
map cmd+f launch --type=overlay --stdin-source=@screen_scrollback /usr/bin/less +G -R
|
||||||
|
|
||||||
|
# Font Size
|
||||||
|
map cmd+plus change_font_size all +2.0
|
||||||
|
map cmd+minus change_font_size all -2.0
|
||||||
|
map cmd+0 change_font_size all 0
|
||||||
|
|
||||||
|
# Background Opacity
|
||||||
|
map ctrl+shift+a>m set_background_opacity +0.1
|
||||||
|
map ctrl+shift+a>l set_background_opacity -0.1
|
||||||
|
map ctrl+shift+a>1 set_background_opacity 1
|
||||||
|
map ctrl+shift+a>d set_background_opacity default
|
||||||
|
|
||||||
|
# Advanced Features
|
||||||
|
map ctrl+shift+delete clear_terminal reset active
|
||||||
|
map ctrl+shift+f5 load_config_file
|
||||||
|
map ctrl+shift+f6 debug_config
|
||||||
|
|
||||||
|
# Scrollback
|
||||||
|
map ctrl+shift+s show_scrollback
|
||||||
|
map ctrl+shift+g show_last_command_output
|
||||||
|
|
||||||
138
kitty/kitty.conf
Normal file
138
kitty/kitty.conf
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
# Font Configuration
|
||||||
|
font_family MesloGS NF
|
||||||
|
bold_font auto
|
||||||
|
italic_font auto
|
||||||
|
bold_italic_font auto
|
||||||
|
font_size 15
|
||||||
|
|
||||||
|
# Font rendering improvements
|
||||||
|
disable_ligatures never
|
||||||
|
font_features MesloGSNF +calt +liga
|
||||||
|
text_composition_strategy platform
|
||||||
|
undercurl_style thin-sparse
|
||||||
|
|
||||||
|
# Cursor Configuration
|
||||||
|
cursor_shape beam
|
||||||
|
cursor_beam_thickness 1.5
|
||||||
|
cursor_underline_thickness 2.0
|
||||||
|
cursor_blink_interval 0.5
|
||||||
|
cursor_stop_blinking_after 15.0
|
||||||
|
|
||||||
|
# Window Configuration
|
||||||
|
window_padding_width 8 12
|
||||||
|
placement_strategy center
|
||||||
|
window_border_width 1pt
|
||||||
|
draw_minimal_borders yes
|
||||||
|
window_margin_width 0
|
||||||
|
single_window_margin_width -1
|
||||||
|
resize_debounce_time 0.1
|
||||||
|
|
||||||
|
# Visual Polish
|
||||||
|
inactive_text_alpha 0.7
|
||||||
|
dim_opacity 0.75
|
||||||
|
|
||||||
|
# Font size (in pts)
|
||||||
|
# NOTE: Do not use odd values as these affect how kitty renders margin
|
||||||
|
|
||||||
|
# Background & Transparency
|
||||||
|
dynamic_background_opacity yes
|
||||||
|
background_opacity 0.85
|
||||||
|
background_blur 20
|
||||||
|
|
||||||
|
# macOS Specific
|
||||||
|
hide_window_decorations titlebar-only
|
||||||
|
macos_titlebar_color background
|
||||||
|
macos_option_as_alt yes
|
||||||
|
macos_quit_when_last_window_closed yes
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
enable_audio_bell no
|
||||||
|
visual_bell_duration 0.0
|
||||||
|
|
||||||
|
# Enable remote control for new tab creation
|
||||||
|
allow_remote_control yes
|
||||||
|
|
||||||
|
# Keymap
|
||||||
|
include ./keymap.conf
|
||||||
|
|
||||||
|
macos_show_window_title_in none
|
||||||
|
|
||||||
|
# BEGIN_KITTY_THEME
|
||||||
|
# Monokai Classic
|
||||||
|
include current-theme.conf
|
||||||
|
# END_KITTY_THEME
|
||||||
|
|
||||||
|
# macos_titlebar_color background
|
||||||
|
#
|
||||||
|
# Tab Bar Configuration
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_powerline_style round
|
||||||
|
tab_bar_edge top
|
||||||
|
tab_bar_margin_width 2.0
|
||||||
|
tab_bar_margin_height 2.0 0.0
|
||||||
|
tab_bar_min_tabs 1
|
||||||
|
tab_switch_strategy previous
|
||||||
|
|
||||||
|
# Tab Colors (Gruvbox-inspired)
|
||||||
|
active_tab_foreground #282828
|
||||||
|
active_tab_background #fabd2f
|
||||||
|
active_tab_font_style bold
|
||||||
|
|
||||||
|
inactive_tab_foreground #a89984
|
||||||
|
inactive_tab_background #3c3836
|
||||||
|
inactive_tab_font_style normal
|
||||||
|
|
||||||
|
tab_bar_background #282828
|
||||||
|
tab_bar_margin_color #282828
|
||||||
|
|
||||||
|
# Tab Title Template
|
||||||
|
tab_title_template " {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab} {index}: {title.split()[0] if title.rfind(title.split()[0]) < 30 else title.split()[0][:15] + '…'} "
|
||||||
|
active_tab_title_template " {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab} {index}: {title.split()[0] if title.rfind(title.split()[0]) < 30 else title.split()[0][:15] + '…'} "
|
||||||
|
|
||||||
|
# Tab Separators
|
||||||
|
tab_separator " ┇ "
|
||||||
|
tab_fade 0.25 0.5 0.75 1
|
||||||
|
|
||||||
|
# Scrolling & Performance
|
||||||
|
scrollback_lines 10000
|
||||||
|
scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
|
||||||
|
scrollback_pager_history_size 2048
|
||||||
|
wheel_scroll_multiplier 3.0
|
||||||
|
touch_scroll_multiplier 1.0
|
||||||
|
|
||||||
|
# URL Handling
|
||||||
|
detect_urls yes
|
||||||
|
url_color #0087bd
|
||||||
|
url_style curly
|
||||||
|
open_url_with default
|
||||||
|
copy_on_select no
|
||||||
|
strip_trailing_spaces never
|
||||||
|
|
||||||
|
# Selection
|
||||||
|
rectangle_select_modifiers ctrl+alt
|
||||||
|
terminal_select_modifiers shift
|
||||||
|
select_by_word_characters @-./_~?&=%+#
|
||||||
|
|
||||||
|
# Advanced Features
|
||||||
|
allow_hyperlinks yes
|
||||||
|
shell_integration enabled
|
||||||
|
term xterm-kitty
|
||||||
|
|
||||||
|
# Performance
|
||||||
|
repaint_delay 10
|
||||||
|
input_delay 3
|
||||||
|
sync_to_monitor yes
|
||||||
|
|
||||||
|
# Mouse
|
||||||
|
mouse_hide_wait 3.0
|
||||||
|
default_pointer_shape beam
|
||||||
|
pointer_shape_when_grabbed arrow
|
||||||
|
pointer_shape_when_dragging hand
|
||||||
|
|
||||||
|
# Clipboard
|
||||||
|
clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
|
||||||
|
clipboard_max_size 64
|
||||||
|
|
||||||
|
# Notifications
|
||||||
|
enable_notifications yes
|
||||||
|
notify_on_cmd_finish invisible 30.0
|
||||||
21
scripts/kitty-yazi.sh
Executable file
21
scripts/kitty-yazi.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if kitty is running
|
||||||
|
if pgrep -f "kitty" > /dev/null; then
|
||||||
|
# Focus kitty and send the command to create a new tab with y function
|
||||||
|
osascript <<EOF
|
||||||
|
tell application "kitty"
|
||||||
|
activate
|
||||||
|
tell application "System Events"
|
||||||
|
keystroke "t" using {command down}
|
||||||
|
delay 0.2
|
||||||
|
keystroke "y"
|
||||||
|
keystroke return
|
||||||
|
end tell
|
||||||
|
end tell
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no kitty running, open new instance
|
||||||
|
open -a kitty
|
||||||
2
scripts/simple-kitty-yazi.sh
Executable file
2
scripts/simple-kitty-yazi.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
/opt/homebrew/bin/kitty --single-instance -e /opt/homebrew/bin/yazi
|
||||||
20
scripts/tnmount.sh
Executable file
20
scripts/tnmount.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# User Configuration
|
||||||
|
USER="AK127132" # Insert Your AK Number
|
||||||
|
PASSWORD="enzfcj4bhg!mwr8BUH" # Insert your password
|
||||||
|
SERVER="140.78.8.107"
|
||||||
|
SHARE1="TNGROUP/tn-group/ipec"
|
||||||
|
SHARE2="TNHOME/home/AK127132"
|
||||||
|
|
||||||
|
# Mount TNGROUP
|
||||||
|
echo "Mounting TNGROUP..."
|
||||||
|
osascript -e "try" -e "mount volume \"smb://$USER:$PASSWORD@$SERVER/$SHARE1\"" -e "end try"
|
||||||
|
|
||||||
|
# Mount TNHOME
|
||||||
|
echo "Mounting TNHOME..."
|
||||||
|
osascript -e "try" -e "mount volume \"smb://$USER:$PASSWORD@$SERVER/$SHARE2\"" -e "end try"
|
||||||
|
|
||||||
|
echo "Mounting complete."
|
||||||
|
|
||||||
|
|
||||||
14
scripts/toggle_left_display_rotation.sh
Executable file
14
scripts/toggle_left_display_rotation.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LEFT_ID="F1A2D185-B386-4CEB-B155-1A44DDB883FD"
|
||||||
|
DP="/opt/homebrew/bin/displayplacer"
|
||||||
|
|
||||||
|
ROTATION=$($DP list displays | awk "/Persistent screen id: $LEFT_ID/{flag=1} flag && /Rotation:/ {print \$2; exit}")
|
||||||
|
|
||||||
|
echo "Current rotation is: $ROTATION"
|
||||||
|
|
||||||
|
if [ "$ROTATION" = "0" ]; then
|
||||||
|
$DP "id:$LEFT_ID res:2560x1440 hz:60 color_depth:8 scaling:on origin:(-2560,0) degree:90"
|
||||||
|
else
|
||||||
|
$DP "id:$LEFT_ID res:2560x1440 hz:60 color_depth:8 scaling:on origin:(-2560,0) degree:0"
|
||||||
|
fi
|
||||||
14
scripts/toggle_right_display_rotation.sh
Executable file
14
scripts/toggle_right_display_rotation.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
RIGHT_ID="7A7FAED1-82FF-42D7-8D6F-32E397977EB2"
|
||||||
|
DP="/opt/homebrew/bin/displayplacer"
|
||||||
|
|
||||||
|
ROTATION=$($DP list displays | awk "/Persistent screen id: $RIGHT_ID/{flag=1} flag && /Rotation:/ {print \$2; exit}")
|
||||||
|
|
||||||
|
echo "Current rotation is: $ROTATION"
|
||||||
|
|
||||||
|
if [ "$ROTATION" = "0" ]; then
|
||||||
|
$DP "id:$RIGHT_ID res:2560x1440 hz:100 color_depth:8 scaling:on origin:(0,0) degree:90"
|
||||||
|
else
|
||||||
|
$DP "id:$RIGHT_ID res:2560x1440 hz:100 color_depth:8 scaling:on origin:(0,0) degree:0"
|
||||||
|
fi
|
||||||
116
zsh/.zshrc
116
zsh/.zshrc
@@ -1,60 +1,120 @@
|
|||||||
|
# vim:fileencoding=utf-8:foldmethod=marker
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt {{{
|
# Enable Powerlevel10k instant prompt {{{
|
||||||
|
# Loads the instant prompt to make the shell feel fast (part of powerlevel10k)
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
POWERLEVEL9K_INSTANT_PROMPT=quiet
|
POWERLEVEL9K_INSTANT_PROMPT=quiet # run instant prompt quietly
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Environment variables {{{
|
||||||
|
export MYVIMRC="$HOME/.config/nvim/init.lua" # define MYVIMRC variable so you can use $MYVIMRC to access your init.lua
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Load Oh My Zsh {{{
|
# Load Oh My Zsh {{{
|
||||||
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh"
|
export ZSH="$XDG_CONFIG_HOME/.oh-my-zsh" # set path to Oh My Zsh
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh # load Oh My Zsh framework (plugins, completions, themes)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Theme and prompt {{{
|
# Theme and prompt {{{
|
||||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
ZSH_THEME="powerlevel10k/powerlevel10k" # set theme to Powerlevel10k
|
||||||
source $XDG_CONFIG_HOME/p10k/.p10k.zsh
|
source $XDG_CONFIG_HOME/p10k/.p10k.zsh # load Powerlevel10k configuration
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# ZSH Plugins {{{
|
# ZSH Plugins {{{
|
||||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
plugins=(git zsh-autosuggestions zsh-syntax-highlighting) # enable git support, autosuggestions and syntax highlighting
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)" # enable zoxide for fast directory jumping
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Keybindings {{{
|
# Keybindings {{{
|
||||||
bindkey -v
|
bindkey -v # enable vi-style keybindings
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1 # make ESC faster when using vi keybindings
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Aliases and Functions {{{
|
# Aliases and Functions {{{
|
||||||
# Aliases
|
alias wfy="ssh ftp5794822\@www76.world4you.com"
|
||||||
alias h="cd ~"
|
alias h="cd ~" # go to home folder
|
||||||
alias cl="clear"
|
alias f="open ." # open current folder in Finder
|
||||||
alias tnh="cd /Volumes/AK127132"
|
alias cl="clear" # clear terminal screen
|
||||||
alias tng="cd /Volumes/intern"
|
alias tnh="cd /Volumes/AK127132" # quick cd to mounted volume AK127132
|
||||||
alias l='eza --color=always --icons -la --group-directories-first'
|
alias tni="cd /Volumes/ipec/intern" # quick cd to mounted volume intern
|
||||||
alias n='nvim'
|
alias l='eza --color=always --icons -la --group-directories-first' # fancy ls with icons and sorting
|
||||||
alias ne='nvim ~/.zshenv'
|
alias n='nvim' # shortcut for Neovim
|
||||||
alias nz='nvim ~/.config/zsh/.zshrc'
|
alias m='neomutt' # open Neomutt mail client
|
||||||
alias g='git'
|
|
||||||
alias gs='git status'
|
# Quick Access to Config Files
|
||||||
alias gc='git commit'
|
alias ne='nvim ~/.zshenv' # edit global zshenv
|
||||||
|
alias nz='nvim ~/.config/zsh/.zshrc' # edit this zshrc
|
||||||
|
|
||||||
|
alias nni='nvim ~/.config/nvim/init.lua' # edit Neovim init.lua
|
||||||
|
alias sni='source ~/.config/nvim/init.lua' # source Neovim init.lua
|
||||||
|
alias nnp='nvim ~/.config/nvim/lua/plugins/init.lua' # edit main plugins file
|
||||||
|
alias nnk='nvim ~/.config/nvim/lua/keymaps.lua' # edit keymaps.lua
|
||||||
|
alias nns='nvim ~/.config/nvim/lua/settings.lua' # edit settings.lua
|
||||||
|
|
||||||
|
alias ny='nvim ~/.config/yazi/yazi.toml' # edit Yazi config
|
||||||
|
alias nyk='nvim ~/.config/yazi/keymap.toml' # edit Yazi keymap config
|
||||||
|
|
||||||
|
alias nk='nvim ~/.config/kitty/kitty.conf' # edit Kitty terminal config
|
||||||
|
alias nkk='nvim ~/.config/kitty/keymap.conf' # edit Kitty keymap config
|
||||||
|
|
||||||
|
# Git
|
||||||
|
alias g='git' # shorthand for git
|
||||||
|
alias gs='git status' # git status
|
||||||
|
alias gc='git commit' # git commit
|
||||||
|
alias gt='git log --oneline --graph --decorate --all' # git log in graph(tree) format
|
||||||
|
|
||||||
|
# Scripts
|
||||||
|
alias mnt='sh $HOME/.config/scripts/tnmount.sh' # run tnmount.sh script
|
||||||
|
|
||||||
# Quick access to notes
|
# Quick access to notes
|
||||||
alias nt='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/TODO.md'
|
alias nt='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/TODO.md' # open TODO list
|
||||||
alias ne='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Einkaufsliste.md'
|
alias ne='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Einkaufsliste.md' # open shopping list
|
||||||
|
alias nb='nvim ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat/Persönliches/Bucketlists/2025.md' # open 2025 bucket list
|
||||||
|
|
||||||
# Custom Functions
|
# Custom Functions
|
||||||
# Start yazi with y, and make it cd to pwd on quit
|
# Start yazi with "y", and when you quit yazi, your shell will "cd" to the folder you navigated to in yazi
|
||||||
function y() {
|
function y() {
|
||||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
|
||||||
yazi "$@" --cwd-file="$tmp"
|
yazi "$@" --cwd-file="$tmp"
|
||||||
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
if [ -f "$tmp" ]; then
|
||||||
builtin cd -- "$cwd"
|
local cwd="$(cat "$tmp")"
|
||||||
|
if [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
|
cd "$cwd"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# iTerm2 shell integration {{{
|
# iTerm2 shell integration {{{
|
||||||
source $XDG_CONFIG_HOME/iterm2/.iterm2_shell_integration.zsh
|
source $XDG_CONFIG_HOME/iterm2/.iterm2_shell_integration.zsh # load iTerm2 shell integration (enables iTerm2 features)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
# Conda initialize {{{
|
||||||
|
# export PATH="/opt/homebrew/anaconda3/bin:$PATH" # commented out by conda initialize
|
||||||
|
# >>> conda initialize >>>
|
||||||
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
|
__conda_setup="$('/opt/homebrew/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
eval "$__conda_setup" # conda properly initialized
|
||||||
|
else
|
||||||
|
if [ -f "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" ]; then
|
||||||
|
. "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" # fallback to sourcing conda profile
|
||||||
|
else
|
||||||
|
export PATH="/opt/homebrew/anaconda3/bin:$PATH" # fallback: manually add conda to path
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset __conda_setup
|
||||||
|
# <<< conda initialize <<<
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# OpenAI API Key {{{
|
||||||
|
export OPENAI_API_KEY="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" # OpenAI API key for ChatGPT or API access
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
|
||||||
|
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user