https://github.com/littlenewton/zsh-config
My Zsh profiles.
https://github.com/littlenewton/zsh-config
zsh
Last synced: 3 months ago
JSON representation
My Zsh profiles.
- Host: GitHub
- URL: https://github.com/littlenewton/zsh-config
- Owner: LittleNewton
- Created: 2023-10-07T15:48:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T22:31:21.000Z (4 months ago)
- Last Synced: 2025-03-25T07:25:27.720Z (4 months ago)
- Topics: zsh
- Language: Shell
- Homepage: https://littlenewton.cn/2023/05/solution-linux-zsh-configuration/
- Size: 91.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Zsh config
# Prerequisite
First of all, please make sure your ZDGDesktop type variables are set. If not, please invoke those commands:
``` zsh
tee ${HOME}/.zshenv >/dev/null 2>/dev/null << "EOF"
# XDG path
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"# Zsh related config file.
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export HISTFILE="$ZDOTDIR/.zhistory" # History filepath
export HISTSIZE=10000 # Maximum events for internal history
export SAVEHIST=10000 # Maximum events in history file# Zim related config file.
export ZIM_HOME="$XDG_DATA_HOME/zim"
EOFsource ~/.zshenv
```
## Installation### Normal
If this is the first time you are installing the zsh environment, you can simply run the following command. Then, without any further manual effort, you can get a nice zsh environment.
``` zsh
git clone https://github.com/LittleNewton/zsh-config.git ~/.config/zsh
```If you want to recover your old zsh history, you should `cp ~/.zsh_history ${XDG_CONFIG_HOME/zsh/.zhistory}`
### SSH config
`remote-exe` command needs a well defined `~/.ssh/config`. An example, customized for myself, is provided in [`config/ssh_entries`](/config/ssh_entries). This command should work great with my workflow.
``` bash
cp ~/.config/zsh/config/ssh_entries ~/.ssh/config
```### Docker Environment
If you are in a Docker environment, please run those commands first. [Here](https://github.com/deluan/zsh-in-docker) is the reference.
``` zsh
sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.1/zsh-in-docker.sh)"
rm -fr ${HOME}/.config/zsh && git clone https://github.com/LittleNewton/zsh-config.git ~/.config/zsh
```## Other utility
``` zsh
cd $HOME
GITHUB="https://github.com/LittleNewton"
git clone ${GITHUB}/joshuto-config ~/.config/joshuto
git clone ${GITHUB}/lazygit-config ~/.config/lazygit
git clone ${GITHUB}/tmux-config ~/.config/tmux
git clone ${GITHUB}/tmux-powerline-config ~/.config/tmux-powerline
git clone ${GITHUB}/btop-config.git ~/.config/btop
```