Clean up shell init structure and add Zed editor config

- Remove .init/ directory and associated shell scripts
- Update .gitignore and .zshrc configurations
- Add Zed editor settings.json
This commit is contained in:
2025-11-04 01:17:11 +01:00
parent 7eca0bcc47
commit 3f3cfd54b9
16 changed files with 308 additions and 1409 deletions

85
.zshrc
View File

@@ -1,6 +1,75 @@
if [ -f "$HOME/.init/init.sh" ] ; then
. "$HOME/.init/init.sh"
if [ -d "$HOME/bin" ]; then
export PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/.local/bin" ]; then
export PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/.rbenv/bin" ]; then
export PATH="$PATH:$HOME/.rbenv/bin"
fi
if [ -d "$HOME/.pyenv/bin" ]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
fi
if [ -d "$HOME/.cargo/bin" ]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
if [ -d "/usr/local/go/bin" ]; then
export PATH="$PATH:/usr/local/go/bin"
fi
if [ -d "$HOME/go/bin" ]; then
export PATH="$PATH:$HOME/go/bin"
fi
if [ -d "$HOME/node_modules/.bin" ]; then
export PATH="$PATH:$HOME/node_modules/.bin"
fi
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
if [ -s "$NVM_DIR/nvm.sh" ] ; then
. "$NVM_DIR/nvm.sh"
fi
if [ -s "$NVM_DIR/bash_completion" ] ; then
. "$NVM_DIR/bash_completion"
fi
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
. "$HOME/.rvm/scripts/rvm"
fi
if [ -s "$HOME/.cargo/env" ] ; then
. "$HOME/.cargo/env"
fi
if [ -s "$HOME/.env" ] ; then
export $(cat "$HOME/.env" | xargs)
fi
if command -v oh-my-posh 2>&1 >/dev/null; then
eval "$(! oh-my-posh init zsh --config=~/worker.omp.json)"
fi
if command -v rbenv 2>&1 >/dev/null; then
eval "$(rbenv init - --no-rehash zsh)"
fi
if command -v pyenv 2>&1 >/dev/null; then
eval "$(pyenv init --path)"
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
@@ -117,14 +186,6 @@ source $ZSH/oh-my-zsh.sh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# _home_pull
alias g1='git reset $(git commit-tree "HEAD^{tree}" -m "A new start")'
cd "$HOME/$(cat $HOME/.last_pwd)" &>/dev/null
# pnpm
export PNPM_HOME="/home/valknar/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
export PATH="$PATH:/home/valknar/Projects/zed/universal-lsp/target/release"