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
8713d302
Commit
8713d302
authored
Aug 11, 2014
by
Joseph Tannhuber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility with emacs mode
parent
9376094d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
12 deletions
+33
-12
themes/budspencer/README.md
themes/budspencer/README.md
+15
-2
themes/budspencer/fish_prompt.fish
themes/budspencer/fish_prompt.fish
+7
-3
themes/budspencer/fish_right_prompt.fish
themes/budspencer/fish_right_prompt.fish
+11
-7
No files found.
themes/budspencer/README.md
View file @
8713d302
# budspencer theme
Translation of zsh's prezto
[
budspencer theme
][
budspencer
]
Translation of zsh's prezto
[
budspencer theme
][
budspencer
]
.
## Configuration
The theme behaves similar to vim's airline/powerline plugins. It needs a
[
powerline font
][
font
]
. Although it works with emacs mode, it's more powerful
with vi mode. In order to enable vi mode, put the following lines into
`$HOME/.config/fish/config.fish`
before
`set fish_path $HOME/.oh-my-fish`
:
```
set -e fish_key_bindings
set -U fish_key_bindings fish_vi_key_bindings
```
## Left prompt segments
...
...
@@ -46,8 +58,9 @@ Translation of zsh's prezto [budspencer theme][budspencer]
## TODO
-
vi REPLACE mode
-
vi REPLACE mode
, as soon as REPLACE mode is implemented within fish
[
budspencer
]:
https://github.com/tannhuber/prezto
[
font
]:
https://github.com/Lokaltog/powerline-fonts
[
ranger
]:
http://ranger.nongnu.org/
[
screenshot
]:
https://raw.githubusercontent.com/tannhuber/prezto/master/screenshots/budspencer.png
themes/budspencer/fish_prompt.fish
View file @
8713d302
...
...
@@ -50,7 +50,11 @@ function fish_vi_prompt_cm -d "Displays the current mode"
case default
set_color -b $budspencer_colors[10] $budspencer_colors[1]
echo -en $budspencer_cursors[1]
echo -n " NORMAL "
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
echo -n " NORMAL "
else
echo -n " EMACS "
end
set_color -b $budspencer_colors[1] $budspencer_colors[10]
case insert
set_color -b $budspencer_colors[5] $budspencer_colors[1]
...
...
@@ -118,9 +122,9 @@ function fish_prompt -d "Write out the left prompt of the budspencer theme"
# vi mode
set -l ps_vi ""
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
#
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
set ps_vi (fish_vi_prompt_cm)
end
#
end
# git
set -l ps_git ""
...
...
themes/budspencer/fish_right_prompt.fish
View file @
8713d302
...
...
@@ -43,8 +43,10 @@ function fish_git_toggle_cm -d "Toggles style of git segment, press # in NORMAL
end
commandline -f repaint
end
bind -M default '#' fish_git_toggle_cm
bind -M visual '#' fish_git_toggle_cm
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
bind -M default '#' fish_git_toggle_cm
bind -M visual '#' fish_git_toggle_cm
end
if set -q -x $PWDSTYLE
set -x PWDSTYLE short long none
...
...
@@ -59,8 +61,10 @@ function fish_pwd_toggle_cm -d "Toggles style of pwd segment, press space bar in
end
end
end
bind -M default ' ' fish_pwd_toggle_cm
bind -M visual ' ' fish_pwd_toggle_cm
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
bind -M default ' ' fish_pwd_toggle_cm
bind -M visual ' ' fish_pwd_toggle_cm
end
function fish_cmd_duration_cm -d "Displays the elapsed time of last command"
set -l seconds ""
...
...
@@ -225,14 +229,14 @@ function fish_right_prompt -d "Write out the right prompt of the budspencer them
# git
set ps_git (fish_git_prompt_cm)
if test -n "$ps_git"
set ps_git (set_color $budspencer_colors[3])""(set_color -b $budspencer_colors[3])""$ps_git
set ps_git (set_color $budspencer_colors[3])""(set_color -b $budspencer_colors[3])""$ps_git
(set_color -b $budspencer_colors[3] normal)
end
# pwd
set -l ps_pwd ""
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
#
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
set ps_pwd (fish_pwd_prompt_cm)
end
#
end
# right prompt
echo -n $ps_duration $ps_git $ps_pwd
...
...
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