Merge pull request #63 from RobDay/master

copy_prompts.fish created to integrate custom themes with fish_configs web portal.
pull/2/head
Bruno 11 years ago
commit d0dfd9bb2f

@ -44,6 +44,10 @@ just add a new file (ending in .load) into the `custom/` directory.
I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the [themes](themes/) directory.
## Integrating oh-my-fish themes with fish_config
Fish provides fish_config, a web portal where you can modify some configurations, including changing your fish_prompt. By default, fish_config comes with a series of prepackaged themes. Running copy_prompts.fish installed with oh-my-fish will integrate oh-my-fish's provided themes with fish_config and allow you to choose a custom theme as your prompt.
## Switching to fish

@ -0,0 +1,8 @@
#!/usr/local/bin/fish
# This script will create a symbolic link between all themes included in oh-my-fish to the sample prompts
# This will allow the user to choose an oh-my-fish theme while using the stock fish_config web application
for themePath in (ls $fish_path/themes/*/fish_prompt.fish)
set themeName (echo $themePath | sed "s/.*themes\///;s/\/fish_prompt.fish//")
echo "Adding $themeName to the sample prompts"
ln -sf $themePath $__fish_datadir/tools/web_config/sample_prompts/$themeName.fish
end

@ -1,3 +1,4 @@
# name: Agnoster
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for FISH
#

@ -1,3 +1,4 @@
# name: CoffeeAndCode
# Theme colors
set fish_color_normal 5f5f5f
set fish_color_command 5f87ff

@ -1,3 +1,4 @@
# name: Cor
# Display the following bits on the left:
# * Virtualenv name (if applicable, see https://github.com/adambrenecki/virtualfish)
# * Current user

@ -1,3 +1,4 @@
# name: idan
# Display the following bits on the left:
# * Virtualenv name (if applicable, see https://github.com/adambrenecki/virtualfish)
# * Current directory name

@ -1,3 +1,4 @@
# name: Jacaetevha
function tbytes -d 'calculates the total size of the files in the current directory'
set -l tBytes (ls -al | grep "^-" | awk 'BEGIN {i=0} { i += $5 } END { print i }')

@ -1,3 +1,4 @@
# name: Krisleech
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end

@ -1,3 +1,4 @@
# name: L
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end

@ -1,3 +1,4 @@
# name: Numist
function fish_prompt
set -l last_status $status

@ -1,3 +1,4 @@
# name: RobbyRussel
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end

@ -1,3 +1,4 @@
# name: Uggedal
function fish_prompt
if test -n "$SSH_CONNECTION"
printf '%s ' $HOSTNAME

Loading…
Cancel
Save