Update README.md
markdown for zsh /p10k
This commit is contained in:
parent
a384bdd1a0
commit
58a497f920
1 changed files with 130 additions and 12 deletions
142
README.md
142
README.md
|
|
@ -4,31 +4,70 @@ scripts to help set up KDE, other tweaks.
|
|||
|
||||
|
||||
install yay
|
||||
set up zsh with p10k
|
||||
|
||||
# install everything
|
||||
|
||||
# Set Up Zsh with Powerlevel10k
|
||||
|
||||
## 1. Install Everything
|
||||
|
||||
Install Zsh, Powerlevel10k, plugins, and the Meslo Nerd Font:
|
||||
|
||||
```bash
|
||||
yay -S zsh zsh-theme-powerlevel10k zsh-autosuggestions zsh-syntax-highlighting ttf-meslo-nerd
|
||||
```
|
||||
|
||||
# change default shell to zsh
|
||||
---
|
||||
|
||||
## 2. Change Your Default Shell to Zsh
|
||||
|
||||
```bash
|
||||
chsh -s /bin/zsh
|
||||
```
|
||||
|
||||
#log out of account and log back in
|
||||
> **Important:** Log out of your account and log back in for the change to take effect.
|
||||
|
||||
# paste this into ~/.zshrc
|
||||
---
|
||||
|
||||
## 3. Configure `~/.zshrc`
|
||||
|
||||
Open your Zsh configuration:
|
||||
|
||||
```bash
|
||||
nano ~/.zshrc
|
||||
```
|
||||
|
||||
Paste the following:
|
||||
|
||||
```zsh
|
||||
# ─────────────────────────────────────
|
||||
# Powerlevel10k
|
||||
# ─────────────────────────────────────
|
||||
|
||||
# powerlevel10k
|
||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
|
||||
# autosuggestions
|
||||
|
||||
# ─────────────────────────────────────
|
||||
# Plugins
|
||||
# ─────────────────────────────────────
|
||||
|
||||
# Autosuggestions
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# syntax highlighting
|
||||
# Syntax highlighting
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
|
||||
# ─────────────────────────────────────
|
||||
# Powerlevel10k configuration
|
||||
# ─────────────────────────────────────
|
||||
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
|
||||
# ─────────────────────────────────────
|
||||
# Completion
|
||||
# ─────────────────────────────────────
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
|
|
@ -38,6 +77,11 @@ setopt AUTO_CD
|
|||
zstyle ':completion:*' completer _complete _approximate
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
|
||||
# ─────────────────────────────────────
|
||||
# History
|
||||
# ─────────────────────────────────────
|
||||
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
SAVEHIST=10000
|
||||
|
||||
|
|
@ -45,13 +89,87 @@ setopt APPEND_HISTORY
|
|||
setopt SHARE_HISTORY
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
```
|
||||
|
||||
# in konsole change font to the installed one
|
||||
#run zsh, it will set up the settings for the shell
|
||||
---
|
||||
|
||||
## 4. Configure Powerlevel10k
|
||||
|
||||
Start Zsh:
|
||||
|
||||
```bash
|
||||
zsh
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
p10k configure
|
||||
```
|
||||
|
||||
This launches the Powerlevel10k configuration wizard.
|
||||
|
||||
You can re-run it at any time with:
|
||||
|
||||
```bash
|
||||
p10k configure
|
||||
```
|
||||
|
||||
Your configuration will be saved to:
|
||||
|
||||
```text
|
||||
~/.p10k.zsh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Configure Konsole Font
|
||||
|
||||
In **Konsole**:
|
||||
|
||||
1. Open **Settings → Edit Current Profile**
|
||||
2. Go to **Appearance**
|
||||
3. Change the terminal font
|
||||
4. Select the installed **MesloLGS Nerd Font**
|
||||
5. Apply the changes
|
||||
|
||||
The Nerd Font is required for Powerlevel10k's icons and symbols to display correctly.
|
||||
|
||||
---
|
||||
|
||||
## 6. Final Result
|
||||
|
||||
After logging back in, your shell should start automatically as **Zsh** with:
|
||||
|
||||
* ⚡ Powerlevel10k prompt
|
||||
* 💡 Command autosuggestions
|
||||
* 🎨 Syntax highlighting
|
||||
* 📁 `AUTO_CD`
|
||||
* ✏️ Command correction
|
||||
* ⌨️ Interactive completion menu
|
||||
* 📜 10,000-command history
|
||||
* 🔄 Shared history between Zsh sessions
|
||||
|
||||
### Useful Commands
|
||||
|
||||
Reconfigure Powerlevel10k:
|
||||
|
||||
```bash
|
||||
p10k configure
|
||||
```
|
||||
|
||||
Reload your Zsh configuration without restarting the shell:
|
||||
|
||||
```bash
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
Start Zsh manually:
|
||||
|
||||
```bash
|
||||
zsh
|
||||
```
|
||||
|
||||
# set up to however you like
|
||||
# glhf
|
||||
|
||||
install software like
|
||||
|
|
|
|||
Loading…
Reference in a new issue