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
d2f8ef5b
Commit
d2f8ef5b
authored
Dec 17, 2014
by
Remy Goldschmidt
Committed by
Bruno Pinto
Dec 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added taktoa theme
parent
30327ff5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
themes/taktoa/README.md
themes/taktoa/README.md
+10
-0
themes/taktoa/fish_prompt.fish
themes/taktoa/fish_prompt.fish
+81
-0
No files found.
themes/taktoa/README.md
0 → 100644
View file @
d2f8ef5b
## taktoa
A theme by taktoa
#### Characteristics
*
Shows current git information
*
Shows hostname if you are connected via ssh
*
Show current terminal multiplexer status (screen/tmux pane name and number)
*
Arrow is a lambda
themes/taktoa/fish_prompt.fish
0 → 100644
View file @
d2f8ef5b
# name: taktoa
# by taktoa (Remy Goldschmidt) <taktoa@gmail.com>
# License: public domain
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_status_symbol
set -l git_status (git status --porcelain ^/dev/null)
if test -n "$git_status"
if git status --porcelain ^/dev/null | grep '^.[^ ]' >/dev/null
echo '*' # dirty
else
echo '#' # all staged
end
else
echo '' # clean
end
end
function _remote_hostname
echo (whoami)
if test -n "$SSH_CONNECTION"
echo " (ssh)"
end
end
function _get_tmux_window
tmux lsw | grep active | sed 's/\*.*$//g;s/: / /1' | awk '{ print $2 "-" $1 }' -
end
function _get_screen_window
set initial (screen -Q windows; screen -Q echo "")
set middle (echo $initial | sed 's/ /\n/g' | grep '\*' | sed 's/\*\$ / /g')
echo $middle | awk '{ print $2 "-" $1 }' -
end
function _is_multiplexed
set multiplexer ""
if test -z $TMUX
else
set multiplexer "tmux"
end
if test -z $WINDOW
else
set multiplexer "screen"
end
echo $multiplexer
end
function fish_prompt
set -l cyan (set_color cyan)
set -l brown (set_color brown)
set -l normal (set_color normal)
set -l arrow "λ"
set -l cwd (set_color $fish_color_cwd)(prompt_pwd)
set -l git_status (_git_status_symbol)(_git_branch_name)
if test -n "$git_status"
set git_status " $git_status"
end
set multiplexer (_is_multiplexed)
switch $multiplexer
case screen
set pane (_get_screen_window)
case tmux
set pane (_get_tmux_window)
end
if test -z $pane
set window ""
else
set window " ($pane)"
end
echo -n -s (_remote_hostname) ' ' $cwd $brown $window $cyan $git_status $normal ' ' $arrow ' '
end
\ No newline at end of file
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