Remove Oh-My-Fish & Use Sashimi Prompt
- Remove oh-my-fish - Update fish dracula theme - Add sashimi fish prompt directly to config file - Modify default sashimi colors to use dracula colors - Move greeting and prompt to main config file
This commit is contained in:
@@ -1,25 +1,33 @@
|
|||||||
|
# Dracula Color Palette
|
||||||
set -l foreground f8f8f2
|
set -l foreground f8f8f2
|
||||||
set -l selection 44475a
|
set -l selection 44475a
|
||||||
set -l comment 6272a4
|
set -l comment 6272a4
|
||||||
|
set -l red ff5555
|
||||||
set -l red ff5555
|
|
||||||
set -l orange ffb86c
|
set -l orange ffb86c
|
||||||
set -l yellow f4f99d
|
set -l yellow f1fa8c
|
||||||
set -l green 50fa7b
|
set -l green 50fa7b
|
||||||
set -l cyan 8be9fd
|
|
||||||
set -l pink ff79c6
|
|
||||||
set -l purple bd93f9
|
set -l purple bd93f9
|
||||||
|
set -l cyan 8be9fd
|
||||||
|
set -l pink ff79c6
|
||||||
|
|
||||||
|
# Syntax Highlighting Colors
|
||||||
|
set -g fish_color_normal $foreground
|
||||||
|
set -g fish_color_command $cyan
|
||||||
|
set -g fish_color_quote $yellow
|
||||||
|
set -g fish_color_redirection $foreground
|
||||||
|
set -g fish_color_end $orange
|
||||||
|
set -g fish_color_error $red
|
||||||
|
set -g fish_color_param $purple
|
||||||
|
set -g fish_color_comment $comment
|
||||||
|
set -g fish_color_match --background=$selection
|
||||||
|
set -g fish_color_selection --background=$selection
|
||||||
|
set -g fish_color_search_match --background=$selection
|
||||||
|
set -g fish_color_operator $green
|
||||||
|
set -g fish_color_escape $pink
|
||||||
set -g fish_color_autosuggestion $comment
|
set -g fish_color_autosuggestion $comment
|
||||||
set -g fish_color_command $cyan
|
|
||||||
set -g fish_color_comment $comment
|
# Completion Pager Colors
|
||||||
set -g fish_color_end $orange
|
set -g fish_pager_color_progress $comment
|
||||||
set -g fish_color_error $red
|
set -g fish_pager_color_prefix $cyan
|
||||||
set -g fish_color_escape $pink
|
set -g fish_pager_color_completion $foreground
|
||||||
set -g fish_color_normal $foreground
|
set -g fish_pager_color_description $comment
|
||||||
set -g fish_color_operator $green
|
|
||||||
set -g fish_color_param $purple
|
|
||||||
set -g fish_color_quote $yellow
|
|
||||||
set -g fish_color_redirection $foreground
|
|
||||||
set -g fish_color_search_match --background=$selection
|
|
||||||
set -g fish_color_selection --background=$selection
|
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
# Path to Oh My Fish install.
|
|
||||||
set -q XDG_DATA_HOME
|
|
||||||
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
|
|
||||||
or set -gx OMF_PATH "$HOME/.local/share/omf"
|
|
||||||
|
|
||||||
# Load Oh My Fish configuration.
|
|
||||||
source $OMF_PATH/init.fish
|
|
@@ -1,48 +1,127 @@
|
|||||||
###############
|
############
|
||||||
# FISH PROMPT #
|
# GREETING #
|
||||||
###############
|
############
|
||||||
# Color Scripts
|
/opt/shell-color-scripts/colorscript.sh random # Color Scripts
|
||||||
/bin/bash /opt/shell-color-scripts/colorscript.sh -r
|
set fish_greeting "¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>" # Fish Greeting
|
||||||
|
|
||||||
###########
|
#############
|
||||||
# ALIASES #
|
# VARIABLES #
|
||||||
###########
|
#############
|
||||||
# dotfiles repo
|
set -U fish_user_paths $fish_user_paths $HOME/.local/bin/
|
||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# EXPORTS #
|
# EXPORTS #
|
||||||
###########
|
###########
|
||||||
export EDITOR="code -w"
|
export TERM=xterm-256color # Sets the terminal type
|
||||||
export TERM=xterm-256color
|
export EDITOR="code -w" # $EDITOR use vscode in terminal
|
||||||
export XDG_CONFIG_HOME=$HOME/.config
|
export XDG_CONFIG_HOME=$HOME/.config # Set Config directory
|
||||||
|
|
||||||
############################
|
###########
|
||||||
# BOBTHEFISH CONFIGURATION #
|
# ALIASES #
|
||||||
############################
|
###########
|
||||||
# Git
|
# pacman and yay
|
||||||
set -g theme_display_git yes
|
alias pacsyu='sudo pacman -Syyu' # update only standard pkgs
|
||||||
set -g theme_display_git_dirty yes
|
alias yaysua='yay -Sua --noconfirm' # update only AUR pkgs
|
||||||
set -g theme_display_git_untracked yes
|
alias yaysyu='yay -Syu --noconfirm' # update standard pkgs and AUR pkgs
|
||||||
set -g theme_display_git_ahead_verbose yes
|
alias unlock='sudo rm /var/lib/pacman/db.lck' # remove pacman lock
|
||||||
set -g theme_display_git_dirty_verbose yes
|
alias cleanup='sudo pacman -Rns (pacman -Qtdq)' # remove orphaned packages
|
||||||
set -g theme_display_git_stashed_verbose yes
|
|
||||||
set -g theme_display_git_master_branch yes
|
|
||||||
|
|
||||||
# Fonts
|
# get fastest mirrors
|
||||||
set -g theme_nerd_fonts yes
|
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
|
||||||
|
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
|
||||||
|
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
|
||||||
|
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
|
||||||
|
|
||||||
# Prompt
|
# Colorize grep output (good for log files)
|
||||||
set -g theme_display_user yes
|
alias grep='grep --color=auto'
|
||||||
set -g fish_prompt_pwd_dir_length 0
|
alias egrep='egrep --color=auto'
|
||||||
set -g theme_newline_cursor yes
|
alias fgrep='fgrep --color=auto'
|
||||||
set -g theme_title_display_process yes
|
|
||||||
set -g theme_title_display_user yes
|
|
||||||
set -g theme_display_hostname yes
|
|
||||||
|
|
||||||
# Theme
|
# confirm before overwriting something
|
||||||
set -g theme_color_scheme dracula
|
alias cp="cp -i"
|
||||||
|
alias mv='mv -i'
|
||||||
|
alias rm='rm -i'
|
||||||
|
|
||||||
# Python
|
# gpg encryption
|
||||||
set -g theme_display_virtualenv yes
|
# verify signature for isos
|
||||||
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
|
alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
|
||||||
|
# receive the key of a developer
|
||||||
|
alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
|
||||||
|
|
||||||
|
# bare git repo alias for dotfiles
|
||||||
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
|
|
||||||
|
###############
|
||||||
|
# FISH PROMPT #
|
||||||
|
###############
|
||||||
|
# This was the 'sashimi' prompt from oh-my-fish.
|
||||||
|
function fish_prompt
|
||||||
|
source ~/.config/fish/conf.d/dracula.fish
|
||||||
|
set -l last_status $status
|
||||||
|
set -l cyan (set_color -o $fish_color_command)
|
||||||
|
set -l yellow (set_color -o $fish_color_quote)
|
||||||
|
set -g red (set_color -o $fish_color_error)
|
||||||
|
set -g blue (set_color -o blue)
|
||||||
|
set -l green (set_color -o $fish_color_operator)
|
||||||
|
set -g normal (set_color $fish_color_escape)
|
||||||
|
|
||||||
|
set -l ahead (_git_ahead)
|
||||||
|
set -g whitespace ' '
|
||||||
|
|
||||||
|
if test $last_status = 0
|
||||||
|
set initial_indicator "$green◆"
|
||||||
|
set status_indicator "$normal❯$cyan❯$green❯"
|
||||||
|
else
|
||||||
|
set initial_indicator "$red✖ $last_status"
|
||||||
|
set status_indicator "$red❯$red❯$red❯"
|
||||||
|
end
|
||||||
|
set -l cwd $cyan(basename (prompt_pwd))
|
||||||
|
|
||||||
|
if [ (_git_branch_name) ]
|
||||||
|
if test (_git_branch_name) = 'master'
|
||||||
|
set -l git_branch (_git_branch_name)
|
||||||
|
set git_info "$normal git:($red$git_branch$normal)"
|
||||||
|
else
|
||||||
|
set -l git_branch (_git_branch_name)
|
||||||
|
set git_info "$normal git:($blue$git_branch$normal)"
|
||||||
|
end
|
||||||
|
if [ (_is_git_dirty) ]
|
||||||
|
set -l dirty "$yellow ✗"
|
||||||
|
set git_info "$git_info$dirty"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Notify if a command took more than 5 minutes
|
||||||
|
if [ "$CMD_DURATION" -gt 300000 ]
|
||||||
|
echo The last command took (math "$CMD_DURATION/1000") seconds.
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -n -s $initial_indicator $whitespace $cwd $git_info $whitespace $ahead $status_indicator $whitespace
|
||||||
|
end
|
||||||
|
|
||||||
|
function _git_ahead
|
||||||
|
set -l commits (command git rev-list --left-right '@{upstream}...HEAD' ^/dev/null)
|
||||||
|
if [ $status != 0 ]
|
||||||
|
return
|
||||||
|
end
|
||||||
|
set -l behind (count (for arg in $commits; echo $arg; end | grep '^<'))
|
||||||
|
set -l ahead (count (for arg in $commits; echo $arg; end | grep -v '^<'))
|
||||||
|
switch "$ahead $behind"
|
||||||
|
case '' # no upstream
|
||||||
|
case '0 0' # equal to upstream
|
||||||
|
return
|
||||||
|
case '* 0' # ahead of upstream
|
||||||
|
echo "$blue↑$normal_c$ahead$whitespace"
|
||||||
|
case '0 *' # behind upstream
|
||||||
|
echo "$red↓$normal_c$behind$whitespace"
|
||||||
|
case '*' # diverged from upstream
|
||||||
|
echo "$blue↑$normal$ahead $red↓$normal_c$behind$whitespace"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _git_branch_name
|
||||||
|
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
|
||||||
|
end
|
||||||
|
|
||||||
|
function _is_git_dirty
|
||||||
|
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
|
||||||
|
end
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
function fish_greeting
|
|
||||||
set_color $fish_color_autosuggestion
|
|
||||||
echo "¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>"
|
|
||||||
set_color normal
|
|
||||||
end
|
|
@@ -1 +0,0 @@
|
|||||||
/home/sravan/.local/share/omf/themes/bobthefish/fish_prompt.fish
|
|
Submodule .config/oh-my-fish deleted from 4ff9981ac2
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -10,6 +10,3 @@
|
|||||||
[submodule ".config/slstatus"]
|
[submodule ".config/slstatus"]
|
||||||
path = .config/slstatus
|
path = .config/slstatus
|
||||||
url = https://github.com/balajsra/slstatus.git
|
url = https://github.com/balajsra/slstatus.git
|
||||||
[submodule ".config/oh-my-fish"]
|
|
||||||
path = .config/oh-my-fish
|
|
||||||
url = git@github.com:oh-my-fish/oh-my-fish.git
|
|
||||||
|
Reference in New Issue
Block a user