Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
06572e0d
Commit
06572e0d
authored
Jun 25, 2013
by
Bruno
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #45 from erikkallen/master
New theme cor
parents
cd0602aa
8551cacf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
0 deletions
+169
-0
plugins/emoji-clock/emoji-clock.fish
plugins/emoji-clock/emoji-clock.fish
+89
-0
themes/cor/fish_prompt.fish
themes/cor/fish_prompt.fish
+46
-0
themes/cor/fish_right_prompt.fish
themes/cor/fish_right_prompt.fish
+34
-0
No files found.
plugins/emoji-clock/emoji-clock.fish
0 → 100644
View file @
06572e0d
# ------------------------------------------------------------------------------
# FILE: emoji-clock.plugin.zsh
# DESCRIPTION: The current time with half hour accuracy as an emoji symbol.
# Inspired by Andre Torrez' "Put A Burger In Your Shell"
# http://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html
# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) ported to fish by Erik Kallen
# VERSION: 1.0.0
# -----------------------------------------------------------------------------
function emoji-clock
set hour (date '+%I')
set minutes (date '+%M')
switch $hour
case 01
if test $minutes -ge 30
set clock "🕜"
else
set clock "🕐"
end
case 02
if test $minutes -ge 30
set clock "🕝"
else
set clock "🕑"
end
case 03
if test $minutes -ge 30
set clock "🕞"
else
set clock "🕒"
end
case 04
if test $minutes -ge 30
set clock "🕟"
else
set clock "🕓"
end
case 05
if test $minutes -ge 30
set clock "🕠"
else
set clock "🕔"
end
case 06
if test $minutes -ge 30
set clock "🕡"
else
set clock "🕕"
end
case 07
if test $minutes -ge 30
set clock "🕢"
else
set clock "🕖"
end
case 08
if test $minutes -ge 30
set clock "🕣"
else
set clock "🕗"
end
case 09
if test $minutes -ge 30
set clock "🕤"
else
set clock "🕘"
end
case 10
if test $minutes -ge 30
set clock "🕥"
else
set clock "🕙"
end
case 11
if test $minutes -ge 30
set clock "🕦"
else
set clock "🕚"
end
case 12
if test $minutes -ge 30
set clock "🕧"
else
set clock "🕛"
end
case '*' set clock "⌛"
end
echo $clock
end
themes/cor/fish_prompt.fish
0 → 100644
View file @
06572e0d
# Display the following bits on the left:
# * Virtualenv name (if applicable, see https://github.com/adambrenecki/virtualfish)
# * Current user
# * Current compressed directory name
# * return status if not 0
function fish_prompt
set -l last_status $status
set -l yellow (set_color ffff33)
set -l dark_yellow (set_color ffb266)
set -l red (set_color red)
set -l green (set_color 80ff00)
set -l normal (set_color normal)
set -l dark_green (set_color 006600)
set -l cwd $cyan(basename (prompt_pwd))
# Prompt
set -l prompt
if [ "$UID" = "0" ]
set prompt "$red# "
else
set prompt "$normal% "
end
# output the prompt, left to right
# Add a newline before prompts
#echo -e ""
# Display [venvname] if in a virtualenv
if set -q VIRTUAL_ENV
echo -n -s (set_color -b cyan black) '[' (basename "$VIRTUAL_ENV") ']' $normal ' '
end
if test $last_status -ne 0
set ret_status $red $last_status '↵' $normal
end
# Display the current directory name
echo -n -s $green (whoami) $dark_green @ $green (hostname|cut -d . -f 1) $dark_green › $yellow (prompt_pwd) $ret_status $dark_yellow (emoji-clock) ' ⁑' $normal
#echo -n -s $green (whoami) $dark_green @ $green (hostname|cut -d . -f 1) $dark_green › $yellow (prompt_pwd) $ret_status $dark_yellow ⁑ $normal
# Terminate with a nice prompt char
echo -n -s ' ' $normal
end
themes/cor/fish_right_prompt.fish
0 → 100644
View file @
06572e0d
# Display git branch and dirty bit and current time on the right
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_right_prompt
set -l cyan (set_color cyan)
set -l red (set_color red)
set -l normal (set_color normal)
set -l yellow (set_color cccc00)
set -l green (set_color 80ff00)
set -l pink (set_color ff99ff)
set -l dark_pink (set_color cc99ff)
# Show git branch and dirty state
if [ (_git_branch_name) ]
set -l git_branch (_git_branch_name)
if [ (_is_git_dirty) ]
echo -n -s $cyan '‹' $yellow $git_branch $red '*' $cyan '›' $normal
else
echo -n -s $cyan '‹' $yellow $git_branch $cyan '›' $normal
end
end
echo -n -s $pink ' [' $dark_pink (date +%H:%M:%S) $pink '] '
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment