https://github.com/ppcamp/shell
Shell config for my personal use
https://github.com/ppcamp/shell
Last synced: about 1 year ago
JSON representation
Shell config for my personal use
- Host: GitHub
- URL: https://github.com/ppcamp/shell
- Owner: ppcamp
- License: mit
- Created: 2025-04-03T22:00:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-13T15:23:41.000Z (about 1 year ago)
- Last Synced: 2025-04-13T16:33:38.253Z (about 1 year ago)
- Language: Shell
- Size: 79.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shell
Shell config for my personal use
[Suggestted programs](https://gist.github.com/ppcamp/91dd1fc9ae5f3c78026617720e26795e)
[Bash commands](https://gist.github.com/ppcamp/14f3f5cdc71e66d955e21043ec5d27b7)
## Installation
```sh
cd $HOME/.config
# needs to be recursive, so it can fetch the submodules
git clone --recursive https://github.com/ppcamp/shell
mv ~/.zshrc{,.bak}
# while in the folder where you cloned this repo
echo "source $PWD/shell/init.zsh" > ~/.zshrc
```
> WARN: https://github.com/disrupted/dotfiles/blob/master/.zshrc
> [!TIP]
> Run the make commands to install the tools you need.
> [!NOTE]
>
> Must be cloned directly in the folder that you plan to keep it, and then
> replace the `~/.zshrc` for this one.
Zshrc config
Put this at the end of `$HOME/.zshrc` to load the rest of the config
See `internal/utils/loaders:add_path_if_exec` for more details.
> Check it out the `make configure-paths` command.
```sh
############################## Go
#$ go env GOPATH | xcp
export PATH="$PATH:$HOME/.asdf/installs/golang/1.24.0/packages/bin"
############################## Rust crates
#$ rustc --print sysroot | xargs -I{} realpath "{}/../../bin" | xcp
export CARGO_FOLDER="$HOME/.asdf/installs/rust/1.85.0/bin"
export PATH="$PATH:$CARGO_FOLDER"
############################## node
#$ npm config get prefix | xcp
export PATH="$PATH:$HOME/.asdf/installs/nodejs/lts"
############################## python env
source "$HOME/.cache/venv/bin/activate"
```
Example of `$HOME/.zshrc`:
```sh
# load zen config
source $HOME/.config/shell/init.zsh
############################## Go
#$ go env GOPATH | xcp
export PATH="$PATH:/home/asapcard-note-h1y/go"
############################## Rust crates
#$ rustc --print sysroot | xargs -I{} realpath "{}/../../bin" | xcp
# export CARGO_FOLDER=""
# export PATH="$PATH:$CARGO_FOLDER"
############################## node
#$ npm config get prefix | xcp
export PATH="$PATH:/home/asapcard-note-h1y/.asdf/installs/nodejs/20.18.3"
############################# SSH Agent plugin config
zstyle :omz:plugins:ssh-agent agent-forwarding yes
zstyle :omz:plugins:ssh-agent lifetime 1h
zstyle :omz:plugins:ssh-agent identities ~/.ssh/{bitbucket_,sftp_*}
zstyle :omz:plugins:ssh-agent quiet yes
zinit ice wait"0a" lucid
zinit light $HOME/.config/shell/plugins/ssh-agent
```
### TODO
- [ ] add the others dotfiles
- [x] add scripts to install tools
- [x] remove submodules, since they are not needed anymore (zinit support)
- [x] improve load performance against omzshc config
- [x] fzf completions not working
- [x] fix paths wrapper import
## Notes
[devhints]
### Performance checking

> The omzsh version didn't use the `mcfly` history manager, neither `starship` (it evals everytime starship)
```sh
# time with a custom zsh config
ZDOTDIR=$HOME/omzsh/ zsh -i -c exit
# time
ZDOTDIR=$HOME zsh -i -c exit
```
[devhints]: https://devhints.io/