├── LICENSE ├── README.md ├── screenshot.png └── theto.zsh-theme /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 - Victor Gama de Oliveira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ▲ Theto 2 | > _A simplistic theme for ZSH_ 3 | 4 | ![](screenshot.png) 5 | 6 | ## Installing 7 | To use this, either install [Nerd Fonts](https://nerdfonts.com) 8 | or change `box_suffix` and `box_prefix` with symbols available in your 9 | font of choice. 10 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyvito/theto-zsh-theme/2ad1e80d80db24d66059148d9fcf55a0ed975442/screenshot.png -------------------------------------------------------------------------------- /theto.zsh-theme: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh ts=2 sw=2 sts=2 2 | 3 | # ▲ Theto 4 | # ~~~~~~~~~~ 5 | # A simplistic theme for ZSH 6 | # 7 | # To use this, either install Nerd Fonts (nerdfonts.com) 8 | # or change box_suffix and box_prefix with symbols available 9 | # in your font of choice. 10 | 11 | 12 | box_prefix='' 13 | box_suffix='' 14 | 15 | prompt_vi_git_info() { 16 | ref=$(command git symbolic-ref HEAD 2> /dev/null) \ 17 | || ref=$(command git rev-parse --short HEAD 2> /dev/null) \ 18 | || return 0 19 | 20 | echo "${ref#refs/heads/}" 21 | } 22 | 23 | prompt_vi_git_status() { 24 | if git rev-parse --git-dir > /dev/null 2>&1; then 25 | if test -z "$(git status --porcelain --ignore-submodules)"; then 26 | status_color="green" 27 | else 28 | status_color="magenta" 29 | fi 30 | 31 | echo -n "%{$fg[grey]%}$box_prefix%{$fg[$status_color]%}%{$bg[grey]%}\uf418 $(prompt_vi_git_info) %{$reset_color%}%{$bg[$status_color]%} %{$reset_color%}%{$fg[$status_color]%}$box_suffix%{$reset_color%}" 32 | fi 33 | } 34 | 35 | prompt_vi_show_machine_name() { 36 | if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then 37 | echo -n "%{$fg[grey]%}$box_prefix%{$fg[yellow]%}%{$bg[grey]%}\uf492 %m %{$reset_color%}%{$bg[yellow]%} %{$reset_color%}%{$fg[yellow]%}$box_suffix%{$reset_color%}" 38 | fi 39 | } 40 | 41 | CURRENT_LOCATION="%{$fg[grey]%}$box_prefix%{$fg[white]%}%{$bg[grey]%}%1~%{$reset_color%}%{$fg[grey]%}$box_suffix%{$reset_color%}" 42 | PROMPT="%(?,%F{242},%F{red}) ⚡ %F{white}%f" 43 | RPS1='$CURRENT_LOCATION $(prompt_vi_git_status)%f$(prompt_vi_show_machine_name)' 44 | --------------------------------------------------------------------------------