Skip to content

Commit e4d18b9

Browse files
committed
update theme v2
1 parent d5f5a92 commit e4d18b9

File tree

4 files changed

+32
-38
lines changed

4 files changed

+32
-38
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Ihor Sakaylyuk
3+
Copyright (c) 2016 Ihor Sakailiuk
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
11
# Laconic
2-
Simple oh-my-zsh theme.
2+
Simple zsh theme.
3+
4+
![Laconic theme](laconic.zsh-theme.png)
35

46
## Instalation
5-
- First you need to install [zsh](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) and [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh).
6-
- Then navigate to ~/.oh-my-zsh/custom/themes
7-
```bash
8-
cd ~/.oh-my-zsh/custom/themes
9-
```
10-
- Clone the repository
11-
```bash
12-
git clone https://github.com/Saka7/laconic.zsh-theme.git
13-
```
14-
- Delete useless files
7+
8+
Download the theme
159
```bash
16-
rm -f LISCENSE README.md laconic.zsh-theme.png
10+
curl -o ~/.oh-my-zsh/themes/laconic.zsh-theme https://raw.githubusercontent.com/Saka7/laconic.zsh-theme/master/laconic.zsh-theme
1711
```
18-
- Change theme in your ~/.zshrc file
12+
13+
Add to your `~/.zshrc` file
1914
```bash
2015
ZSH_THEME="laconic"
2116
```
22-
- Update changes
23-
```bash
24-
source ~/.zshrc
25-
```
26-
27-
## Screenshots
28-
After instalation your terminal should looks like this
29-
30-
![Laconic theme](laconic.zsh-theme.png)
3117

3218
## License
3319
Laconic theme is released under the [MIT License](https://opensource.org/licenses/MIT).
20+

laconic.zsh-theme

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@
22
# Author saka7
33
# Year 2016
44

5-
# Git info
6-
local git_info='$(git_prompt_info)'
7-
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[cyan]%}"
8-
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
9-
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} x"
10-
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}+"
11-
12-
# If exit status is 0 prints green arrow (>) else red one
13-
local return_status="%(?:%{$fg_bold[green]%}>:%{$fg_bold[red]%}>)%{$reset_color%}"
14-
15-
# Current directory in white square bracket
16-
# if user is not root else in red ones
5+
NEWLINE=$'\n'
6+
7+
function error_symbol() {
8+
echo "%{$fg_bold[red]%}$1"
9+
}
10+
11+
function success_symbol() {
12+
echo "%{$fg_bold[green]%}$1"
13+
}
14+
15+
local GIT_INFO='$(git_prompt_info)'
16+
ZSH_THEME_GIT_PROMPT_PREFIX=" | %{$fg_bold[cyan]%}"
17+
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
18+
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} •"
19+
20+
local RETURN_STATUS="%(?:$(success_symbol)└➤ :$(error_symbol)└➤%{$reset_color%}"
21+
local LINE_JOINT="%(?:$(success_symbol)┌:$(error_symbol)┌)"
22+
1723
if [[ $EUID -ne 0 ]]; then
18-
local working_dir="%{$fg_bold[white]%}[%{$fg_bold[yellow]%}%c%{$fg_bold[white]%}]%{$reset_color%}"
24+
local WORKING_DIR="$LINE_JOINT %{$fg_bold[yellow]%}%~%{$reset_color%}"
1925
else
20-
local working_dir="%{$fg_bold[red]%}[%{$fg_bold[yellow]%}%c%{$fg_bold[red]%}]%{$reset_color%}"
26+
local WORKING_DIR="$LINE_JOINT %{$fg_bold[red]%}%~%{$reset_color%}"
2127
fi
2228

23-
PROMPT="${working_dir}${git_info}${return_status} "
29+
PROMPT=" ${WORKING_DIR}${GIT_INFO}${NEWLINE} ${RETURN_STATUS} "
30+

laconic.zsh-theme.png

19.2 KB
Loading

0 commit comments

Comments
 (0)