Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
🔖 v1
Browse files Browse the repository at this point in the history
  • Loading branch information
blyndusk committed May 19, 2019
1 parent 7e3757d commit 0d3c40a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# sm-theme

<a href="https://github.com/blyndusk/sm-theme/releases/latest"><img src="https://img.shields.io/github/release-pre/blyndusk/sm-theme.svg"/></a>
<a href="https://github.com/blyndusk/sm-theme/releases/latest"><img src="https://img.shields.io/github/release/blyndusk/sm-theme.svg" alt="sm-theme last release"/></a>
<img src="https://img.shields.io/github/languages/top/blyndusk/sm-theme.svg" alt="sm-theme top language"/>
<a href="https://github.com/blyndusk/sm-theme/blob/master/LICENSE"><img src="https://img.shields.io/github/license/blyndusk/sm-theme.svg"/></a>
<a href="https://github.com/blyndusk/sm-theme/blob/master/LICENSE" alt="sm license"><img src="https://img.shields.io/github/license/blyndusk/sm-theme.svg"/></a>

![sm-theme](./docs/sm-theme.png)

Expand Down Expand Up @@ -38,34 +38,38 @@
#### Without smileys

```bash
13 local with_smileys=0;
13 local SM_WITH_SMILEYS=0;
```

![with-smileys](./docs/without-smileys.png)
![without-smileys-clean](./docs/without-smileys-clean.png)
![without-smileys-dirty](./docs/without-smileys-dirty.png)

#### With smileys

```bash
13 local with_smileys=1;
13 local SM_WITH_SMILEYS=1;
```

![with-smileys](./docs/default.png)
![with-smileys-clean](./docs/with-smileys-clean.png)
![with-smileys-clean](./docs/with-smileys-dirty.png)

### 2. Lines

#### With two lines

```bash
16 local prompt_lines=2;
16 local SM_PROMPT_LINES=2;
```
![with-smileys](./docs/2-lines.png)

![2 lines](./docs/2-lines.png)

#### With three lines

```bash
16 local prompt_lines=3;
16 local SM_PROMPT_LINES=3;
```
![with-smileys](./docs/default.png)

![3 lines](./docs/with-smileys-dirty.png)

## Curated List

Expand Down
10 changes: 5 additions & 5 deletions sm.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ echo -e "\e[31m
# config

# 1: with smileys ; 0: without smileys
local with_smileys=1;
local SM_WITH_SMILEYS=1;

# 2: with 2 lines ; else: default
local prompt_lines=3
local SM_PROMPT_LINES=3;

# write
# $(pictos_or_smileys 1 <0/1>) to use emojis
# $(pictos_or_smileys 0 <0/1>) to use pictos
pictos_or_smileys () {
local emojis;
local emojis=(" ✘" "[ಠ_ಠ]" " ✔︎" "[・‿・]");
if [ "$1" -eq 0 ] ; then echo "%F{red}${emojis[1 + $with_smileys]}%F{default}" ;
elif [ "$1" -eq 1 ] ; then echo "%F{green}${emojis[3 + $with_smileys]}%F{default}" ; fi
if [ "$1" -eq 0 ] ; then echo "%F{red}${emojis[1 + $SM_WITH_SMILEYS]}%F{default}" ;
elif [ "$1" -eq 1 ] ; then echo "%F{green}${emojis[3 + $SM_WITH_SMILEYS]}%F{default}" ; fi
}

# display red user if sudo is enabeled
Expand All @@ -32,7 +32,7 @@ sudo_color() {
}

sm_prompt() {
if [ $prompt_lines -eq 2 ] ; then
if [ $SM_PROMPT_LINES -eq 2 ] ; then
echo '$SM_PREFIX $SM_USER $SM_DIR $(git_prompt_info) $(git_prompt_status)
$SM_SUFFIX'
else echo '$SM_PREFIX $SM_USER $(git_prompt_info) $(git_prompt_status)
Expand Down

0 comments on commit 0d3c40a

Please sign in to comment.