1 Star 0 Fork 0

flameleo11 / avoleo-zsh-theme

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

The Avoleo theme features a date and time prompt for each command, as well as a command number in history. In addition, it uses special symbols '⠾' and '⡶' to display git if applicable in current path. It also supports custom colors based on the Gnome-Terminal default color palette.

Preview

Avoleo is a custom ZSH theme designed for Ubuntu GNOME Terminal with the built-in scheme "Tango Dark".

Here's an example of what the prompt will look like:

╭─ 259  2023-03-11 13:50:43
├─  ⡶   user@desktop /work/aveleo  ‹master› ✔   13:50:43
╰─  ⠾                                                                                      0 ↵

Here's a screenshot of what the theme looks like in action:

avoleo.zsh-theme

Introduction to avoleo zsh theme

The avoleo zsh theme is a custom theme that provides a minimalist and informative prompt for the zsh shell. It displays the following information:

  • Current working directory and git prompt (if inside a git repository)
  • Current command number in history
  • Date and time of the last command executed
  • Return code of the last command executed

The theme uses unicode characters to create a stylish and compact prompt, with a horizontal line separating the prompt from the command output.

Installation

To install the avoleo theme, follow these steps:

  1. Download the avoleo.zsh-theme file to your computer.
    git clone https://github.com/flameleo11/avoleo-zsh-theme.git
    git clone https://gitee.com/flameleo11/avoleo-zsh-theme.git
  2. Move the file to the ~/.oh-my-zsh/themes directory (if you're using Oh My Zsh).
    mv avoleo-zsh-theme/avoleo.zsh-theme ~/.oh-my-zsh/themes/
  3. Set the ZSH_THEME variable to "avoleo" in your ~/.zshrc file.
    ZSH_THEME="avoleo"
  4. Reload your shell configuration by running source ~/.zshrc.
    source ~/.zshrc

Customization

The avoleo theme supports customization of prompt colors using the built-in color schemes of GNOME Terminal. To customize the colors of the prompt, follow these steps:

Avoleo is a custom ZSH theme designed for Ubuntu GNOME Terminal with the built-in scheme "Tango Dark". It displays useful information such as the current directory, Git branch, command number in history, and return code of the previous command.

  1. Open GNOME Terminal and go to "Preferences" > "Profiles".
  2. Create a new profile or select the built-in scheme "Tango Dark" ( or an existing one ).
  3. Go to the "Colors" tab and select a color scheme.
  4. Enable "Use transparent background" and "Show bold text in bright colors".
  5. Customize the "Palette" colors to change the prompt colors.

The following palette colors are used in the avoleo theme:

  • C1: Black
  • C2: Red
  • C3: Green
  • C4: Yellow
  • C5: Blue
  • C6: Magenta
  • C7: Cyan
  • C8: White

You can modify the color variables in the avoleo.zsh-theme file to use different palette colors.

To enable the debug mode in your zsh custom theme, you need to find the following lines in the avoleo.zsh-theme file:

# show palette color
PROMPT+="$debug_color"

Then, remove the comment symbol # in front of the line PROMPT+="$debug_color" to enable the debug mode. This will display the palette color used for your prompt. image.png

Features

Git Prompt

This theme features a sleek and functional prompt that displays important information about your current working directory and command history.

When you are in a Git repository, two symbols - '⠾' and '⡶' - will be displayed in bright colors and combined together to indicate that the directory is linked to Git. The bright colors represent the current status of the Git repository.

Conversely, when you are outside of a Git repository, the symbols will appear smaller and grayed out, indicating that you are disconnected from Git.

image.png

This simple yet effective feature will help you keep track of your Git repositories at a glance, without having to manually check each time. Give the avoleo theme a try and see how it can improve your Zsh experience!

Additionally, the theme also displays the return code of the last command executed as 0 ↵ at the right end of the prompt to indicate whether the command was successful or not.

Here are some examples of the avoleo theme in action:

image.png

In this example, the command 363 executed not exists command err, failed with a return code 127, then last command staus symbol 127 ↵ show red font on the right of current prompt.

the command 364 executed cd + with invalid params +, failed with return code 1, then last command staus symbol 1 ↵ show red font on the right of current prompt.

the current command number is 366, aflter command 365 executed cd avoleo on 2023-03-11 16:56:31, the current directory is /drive_d/work/avoleo, and the git branch is master with the indicated all file was commited.

the current command number is 367, aflter command 366 create a new file in current branch, then git clean indicated symbol change to .

Author

This theme was created by flameleo.

License

This theme is licensed under the MIT License . Feel free to use and modify it as you wish. ``

MIT License Copyright (c) 2023 flameleo11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

The Avoleo theme features it uses special symbols '⠾' and '⡶' to display git if applicable in current path. It also supports custom colors based on the Gnome-Terminal default color palette. 展开 收起
Shell
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/flameleo11/avoleo-zsh-theme.git
git@gitee.com:flameleo11/avoleo-zsh-theme.git
flameleo11
avoleo-zsh-theme
avoleo-zsh-theme
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891