Compare commits
No commits in common. "75549ce64044336ed14e502f1c1ab8bf98184990" and "8540ec87b320f54354fdba3e1684fb2c780086e8" have entirely different histories.
75549ce640
...
8540ec87b3
Binary file not shown.
10
README.md
10
README.md
|
@ -6,15 +6,15 @@ A fish (shell) theme with a Slavic cat and a rainbow that signifies git status.
|
||||||
[![Oh My Fish](https://img.shields.io/badge/Framework-Oh_My_Fish-blue.svg?style=flat)](https://github.com/oh-my-fish/oh-my-fish)
|
[![Oh My Fish](https://img.shields.io/badge/Framework-Oh_My_Fish-blue.svg?style=flat)](https://github.com/oh-my-fish/oh-my-fish)
|
||||||
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](/LICENSE)
|
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](/LICENSE)
|
||||||
|
|
||||||
![Slavic cat in action](https://github.com/yangwao/omf-theme-slavic-cat/blob/master/screenshot.png?raw=true)
|
![Slavic cat in action](https://github.com/yangwao/theme-slavic-cat/raw/master/screenshot.png)
|
||||||
|
|
||||||
|
|
||||||
## Instalation
|
## Instalation
|
||||||
|
|
||||||
#### Requirements
|
#### Requirements
|
||||||
* [Fish shell](https://github.com/fish-shell/fish-shell) - a smart and user-friendly command line
|
* [Fish shell][fish] - a smart and user-friendly command line
|
||||||
shell for OS X, Linux, and the rest of the family
|
shell for OS X, Linux, and the rest of the family
|
||||||
* [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish) - The Fishshell Framework
|
* [Oh My Fish][omf] - The Fishshell Framework
|
||||||
|
|
||||||
Once Oh My Fish is installed:
|
Once Oh My Fish is installed:
|
||||||
|
|
||||||
|
@ -24,10 +24,8 @@ Once Oh My Fish is installed:
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Minimal Look & Prompt
|
* Minimal look
|
||||||
* Current short version pwd
|
|
||||||
* Display branch for Git projects
|
* Display branch for Git projects
|
||||||
* Git project dirty status indicator *meow* **(R,C,A,U,M,?)** *meow*
|
* Git project dirty status indicator *meow* **(R,C,A,U,M,?)** *meow*
|
||||||
* Fish shell vi mode indicator
|
* Fish shell vi mode indicator
|
||||||
* Next line prompt
|
* Next line prompt
|
||||||
* Two unicodes included!
|
|
||||||
|
|
|
@ -18,36 +18,36 @@ function __slavic_color_echo
|
||||||
end
|
end
|
||||||
|
|
||||||
function __slavic_current_folder
|
function __slavic_current_folder
|
||||||
if test $PWD = /
|
if test $PWD = '/'
|
||||||
echo -n /
|
echo -n '/'
|
||||||
else
|
else
|
||||||
echo -n $PWD | grep -o -E '[^\/]+$'
|
echo -n $PWD | grep -o -E '[^\/]+$'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __slavic_git_status_codes
|
function __slavic_git_status_codes
|
||||||
echo (git status --porcelain 2>/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n')
|
echo (git status --porcelain ^/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n')
|
||||||
end
|
end
|
||||||
|
|
||||||
function __slavic_git_branch_name
|
function __slavic_git_branch_name
|
||||||
echo (git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
echo (git rev-parse --abbrev-ref HEAD ^/dev/null)
|
||||||
end
|
end
|
||||||
|
|
||||||
function __slavic_rainbow
|
function __slavic_rainbow
|
||||||
if echo $argv[1] | grep -q -e $argv[3]
|
if echo $argv[1] | grep -q -e $argv[3]
|
||||||
__slavic_color_echo $argv[2] 彡ミ
|
__slavic_color_echo $argv[2] "彡ミ"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __slavic_git_status_icons
|
function __slavic_git_status_icons
|
||||||
set -l git_status (__slavic_git_status_codes)
|
set -l git_status (__slavic_git_status_codes)
|
||||||
|
|
||||||
__slavic_rainbow $git_status $__slavic_color_pink D
|
__slavic_rainbow $git_status $__slavic_color_pink 'D'
|
||||||
__slavic_rainbow $git_status $__slavic_color_orange R
|
__slavic_rainbow $git_status $__slavic_color_orange 'R'
|
||||||
__slavic_rainbow $git_status $__slavic_color_white C
|
__slavic_rainbow $git_status $__slavic_color_white 'C'
|
||||||
__slavic_rainbow $git_status $__slavic_color_green A
|
__slavic_rainbow $git_status $__slavic_color_green 'A'
|
||||||
__slavic_rainbow $git_status $__slavic_color_blue U
|
__slavic_rainbow $git_status $__slavic_color_blue 'U'
|
||||||
__slavic_rainbow $git_status $__slavic_color_lilac M
|
__slavic_rainbow $git_status $__slavic_color_lilac 'M'
|
||||||
__slavic_rainbow $git_status $__slavic_color_grey '?'
|
__slavic_rainbow $git_status $__slavic_color_grey '?'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -68,28 +68,25 @@ function __slavic_git_status
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_mode_prompt
|
function fish_prompt
|
||||||
set_color $__slavic_color_lilac
|
set_color $__slavic_color_lilac
|
||||||
printf '['
|
printf '['
|
||||||
switch $fish_bind_mode
|
switch $fish_bind_mode
|
||||||
case default
|
case default
|
||||||
set_color red
|
set_color red
|
||||||
printf n
|
printf 'n'
|
||||||
case insert
|
case insert
|
||||||
set_color green
|
set_color green
|
||||||
printf i
|
printf 'i'
|
||||||
case visual
|
case visual
|
||||||
set_color magenta
|
set_color magenta
|
||||||
printf v
|
printf 'v'
|
||||||
end
|
end
|
||||||
set_color $__slavic_color_lilac
|
set_color $__slavic_color_lilac
|
||||||
printf '] '
|
printf '] '
|
||||||
end
|
|
||||||
|
|
||||||
function fish_prompt
|
|
||||||
__slavic_color_echo $__slavic_color_purple (prompt_pwd)
|
__slavic_color_echo $__slavic_color_purple (prompt_pwd)
|
||||||
__slavic_git_status
|
__slavic_git_status
|
||||||
|
|
||||||
echo
|
echo
|
||||||
__slavic_color_echo $__slavic_color_pink "▶ "
|
__slavic_color_echo $__slavic_color_pink "⫸ "
|
||||||
end
|
end
|
||||||
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 72 KiB |
Loading…
Reference in New Issue