Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Includes the following features:
  * All the things you need to know about Git in a glance.
  * A subtle timestamp hanging out off to the right.
  * Previous command status.
  • Loading branch information
bpinto committed Aug 28, 2015
0 parents commit fb917c8
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Bruno Pinto

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.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<div align="center">
<a href="http://github.com/fish-shell/omf">
<img width=90px src="https://cloud.githubusercontent.com/assets/8317250/8510172/f006f0a4-230f-11e5-98b6-5c2e3c87088f.png">
</a>
</div>
<br>

> Default theme for [Oh My Fish][omf-link].
## Install

```fish
$ omf theme default
```

## Features

* All the things you need to know about Git in a glance.
* A subtle timestamp hanging out off to the right.
* Previous command status.

## Screenshot

<p align="center">
<img src="https://cloud.githubusercontent.com/assets/526122/9554176/e3fffb44-4dbb-11e5-88c7-57f2b35ad2b8.png">
</p>

## Configuration

Only display the folder name:
```
set -g theme_short_path yes
```

# License

[MIT][mit] © [bpinto][author] et [al][contributors]


[mit]: http://opensource.org/licenses/MIT
[author]: http://github.com/bpinto
[contributors]: https://github.com/oh-my-fish/theme-default/graphs/contributors
[omf-link]: https://www.github.com/fish-shell/oh-my-fish

[license-badge]: https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square
[travis-badge]: http://img.shields.io/travis/oh-my-fish/theme-default.svg?style=flat-square
[travis-link]: https://travis-ci.org/oh-my-fish/theme-default
12 changes: 12 additions & 0 deletions fish_greeting.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Set global color styles, for example:
#
# function default_error
# set_color -o red
# end
#
# function default_normal
# set_color normal
#

function fish_greeting
end
47 changes: 47 additions & 0 deletions fish_prompt.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# You can override some default options with config.fish:
#
# set -g theme_short_path yes

function fish_prompt
set -l last_command_status $status
set -l cwd

if test "$theme_short_path" = 'yes'
set cwd (basename (prompt_pwd))
else
set cwd (prompt_pwd)
end

set -l fish "⋊>"
set -l ahead ""
set -l behind ""
set -l diverged ""
set -l dirty ""
set -l none ""

set -l normal_color (set_color normal)
set -l success_color (set_color $fish_pager_color_progress ^/dev/null; or set_color cyan)
set -l error_color (set_color $fish_color_error ^/dev/null; or set_color red --bold)
set -l directory_color (set_color $fish_color_quote ^/dev/null; or set_color brown)
set -l repository_color (set_color $fish_color_cwd ^/dev/null; or set_color green)

if test $last_command_status -eq 0
echo -n -s $success_color $fish $normal_color
else
echo -n -s $error_color $fish $normal_color
end

echo -n -s " " $directory_color $cwd $normal_color

if git_is_repo
echo -n -s " on " $repository_color (git_branch_name) $normal_color " "

if git_is_touched
echo -n -s $dirty
else
echo -n -s (git_ahead $ahead $behind $diverged $none)
end
end

echo -n -s " "
end
5 changes: 5 additions & 0 deletions fish_right_prompt.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function fish_right_prompt
set_color $fish_color_autosuggestion ^/dev/null; or set_color 555
date "+%H:%M:%S"
set_color normal
end
3 changes: 3 additions & 0 deletions fish_title.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function fish_title
# Customize the title bar of the terminal window.
end

0 comments on commit fb917c8

Please sign in to comment.