update README.md

This commit is contained in:
philip82148 2023-09-24 09:45:08 +09:00
parent 7b3a2c7e6e
commit 3621f4948f
9 changed files with 53 additions and 66 deletions

View file

@ -2,70 +2,84 @@
## Overview ## Overview
An oh-my-zsh theme; An oh-my-zsh theme.
![demo.png](./demo/demo.png)
### Feature ![demo.png](./reademe/demo.png)
- Real Time Prompt ### Features
- Displays Command Running Time
- Command Execution Error Hint You can see the followings at once:
- Real Time
- Login User
- Working Directory
- Anaconda's Environment Name
- Rich Git Status - Rich Git Status
After command execution, you can see also:
- Command Execution Time
- Success/Error Hint
## Install ## Install
### Basic Install 1. Clone Repo & Copy Theme.
1. Clone Repository:
```shell
git clone https://github.com/philip82148/simplerich-zsh-theme
```
2. Copy Theme:
```shell ```shell
# cd path/to/where_u_want_to_clone_the_repo
git clone --recursive https://github.com/philip82148/simplerich-zsh-theme
cp ./simplerich-zsh-theme/simplerich.zsh-theme ~/.oh-my-zsh/themes/ cp ./simplerich-zsh-theme/simplerich.zsh-theme ~/.oh-my-zsh/themes/
``` ```
3. Edit ~/.zshrc: 2. Edit ~/.zshrc.
```shell:~/.zshrc ```shell
# Find the line that reads ZSH_THEME="..." and replace it with the following code. # file:~/.zshrc
# Find the line that reads ZSH_THEME="..." and replace it with the followings.
ZSH_THEME="simplerich" ZSH_THEME="simplerich"
source path/to/where_u_want_to_clone_the_repo/simplerich-zsh-theme/zsh-git-prompt/zshrc.sh
``` ```
4. Load ~/.zshrc: **Attention**
- These must be BEFORE the line `source $ZSH/oh-my-zsh.sh` in `~/.zshrc`.
- Change the path of `source .../zsh-git-prompt/zshrc.sh` according to your environment.
- If you comment out `source .../zsh-git-prompt/zshrc.sh` or you cannot use `python` command, you can use a simpler git status like the following:
![simpler-git-status.png](./reademe/simpler-git-status.png)
1. Load ~/.zshrc.
```shell ```shell
source ~/.zshrc source ~/.zshrc
``` ```
- See Also: [Overriding and adding themes](https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-themes); See Also: [Overriding and adding themes](https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-themes), [zsh-git-prompt](https://github.com/olivierverdier/zsh-git-prompt)
## Trouble Shooting ## Trouble Shooting
### macOS, command not found: gdate ### On macOS, Command Not Found: gdate
- simplerich.zsh-theme depends on cmd `gdate` to get current time in milliseconds. get `gdate` on macOS by running `brew install coreutils` then `source ~/.zshrc`; - simplerich.zsh-theme depends on cmd `gdate` to get current time in milliseconds. get `gdate` on macOS by running `brew install coreutils` then `source ~/.zshrc`.
- See Also: [#12](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/12); - See also [#12](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/12).
### Linux, command not found: bc ### On Linux, Command Not Found: bc
- simplerich.zsh-theme depends on cmd `bc` to calculate the command running time cost. [get bc on Linux](https://www.tecmint.com/bc-command-examples/#:~:text=If%20you%20don%E2%80%99t%20have%20bc%20on%20your%20system%2C,command%20prompt%20and%20simply%20start%20calculating%20your%20expressions.) then `source ~/.zshrc`; - simplerich.zsh-theme depends on cmd `bc` to calculate the command running time cost. [get bc on Linux](https://www.tecmint.com/bc-command-examples/#:~:text=If%20you%20don%E2%80%99t%20have%20bc%20on%20your%20system%2C,command%20prompt%20and%20simply%20start%20calculating%20your%20expressions.) then `source ~/.zshrc`.
- see also: [#13](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/13); - See also [#13](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/13).
### Centos 7, shell exit ### On Centos 7, Shell Exit
- may caused by [set timer to zsh prompt](https://github.com/ChesterYue/ohmyzsh-theme-passion/blob/8f71c43c2df91810249ab00ff40fc4ca63207467/passion.zsh-theme#L197-L208); - It may be caused by [set timer to zsh prompt](https://github.com/ChesterYue/ohmyzsh-theme-passion/blob/8f71c43c2df91810249ab00ff40fc4ca63207467/passion.zsh-theme#L197-L208).
- see also: [#4](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/4); - See also [#4](https://github.com/ChesterYue/ohmyzsh-theme-passion/issues/4).
## Extra Preferences ## Extra Preferences
### Zsh Plugins ### Zsh Plugins
1. [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions); 1. [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)
2. [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting); 2. [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting)
3. [zsh-completions](https://github.com/zsh-users/zsh-completions)
4. [zsh-history-substring-search](https://github.com/zsh-users/zsh-history-substring-search)
### iTerm2 Preferences ### iTerm2 Preferences
@ -73,14 +87,17 @@ source ~/.zshrc
<!-- cspell:disable-next-line --> <!-- cspell:disable-next-line -->
- iTerm2: settings -> Profiles -> Colors -> Color Presets -> import `./simplerich.itermcolors` ![color.png](./image/color.png) - iTerm2: Settings -> Profiles -> Colors -> Color Presets -> Import `./simplerich.itermcolors`
- alternate terminal: try [Alternate terminal installation and configuration](https://iterm2colorschemes.com/); ![color.png](./reademe/color.png)
- Alternate terminal: Try [Alternate terminal installation and configuration](https://iterm2colorschemes.com/).
#### Status Bar #### Status Bar
- iTerm2: settings -> Appearance && settings -> Profiles -> Session -> Configure Status Bar ![status_0.png](./image/status_0.png) ![status_1.png](./image/status_1.png) - iTerm2: Settings -> Appearance && settings -> Profiles -> Session -> Configure Status Bar
![status_0.png](./reademe/status_0.png) ![status_1.png](./reademe/status_1.png)
#### Font #### Font
- install [JetBrains Mono](https://www.jetbrains.com/lp/mono/); - Install [JetBrains Mono](https://www.jetbrains.com/lp/mono/).
- iTerm2: settings -> Appearance && settings -> Profiles -> Text -> Font ![font.png](./image/font.png) - iTerm2: Settings -> Appearance && settings -> Profiles -> Text -> Font
![font.png](./reademe/font.png)

View file

@ -1,30 +0,0 @@
# demo
## warning
make sure image refed by [External-themes](https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes) exist;
## iTerm title
Settings - Profiles - Window - Custom tab title - ohmyzsh-theme-passion
## cmd
``` shell
# mkdir demo; cd demo; mkdir demo-git; cd demo-git; git init;
# git config --local user.name / user.email ...
# cd ..
echo real time prompt
echo command running time cost prompt
test command running error hint
cd demo-git
echo git status prompt
touch test.txt
git st
git add -A
git ci -m "test"
# enter twice
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

View file

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 207 KiB

BIN
reademe/demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View file

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View file

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 223 KiB