Skip to content

Commit

Permalink
Merge pull request #201 from ogr3/ubuntu-themes-cleanup
Browse files Browse the repository at this point in the history
Tweaked Ubuntu versions of fonts to only override the symbols from De…
  • Loading branch information
magicmonty committed Oct 20, 2015
2 parents c2fa630 + 5727973 commit 40f2d1b
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 8 deletions.
3 changes: 1 addition & 2 deletions themes/Default_NoExitState_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Default NoExitState Ubuntu"
GIT_PROMPT_STAGED="${Red}● " # the number of staged files/directories
GIT_PROMPT_UNTRACKED="${Cyan}… " # the number of untracked files/dirs
GIT_PROMPT_CLEAN="${BoldGreen}✔ " # a colored flag indicating a "clean" repo
GIT_PROMPT_COMMAND_OK="${Green}✔ " # indicator if the last command returned with an exit code of 0
GIT_PROMPT_COMMAND_FAIL="${Red}✘ " # indicator if the last command returned with an exit code of other than 0
GIT_PROMPT_START_USER="${Yellow}${PathShort}${ResetColor}"
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
}

reload_git_prompt_colors "Default NoExitState Ubuntu"
reload_git_prompt_colors "Default NoExitState Ubuntu"
3 changes: 1 addition & 2 deletions themes/Default_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Default Ubuntu"
GIT_PROMPT_STAGED="${Red}● " # the number of staged files/directories
GIT_PROMPT_UNTRACKED="${Cyan}… " # the number of untracked files/dirs
GIT_PROMPT_CLEAN="${BoldGreen}✔ " # a colored flag indicating a "clean" repo
GIT_PROMPT_COMMAND_OK="${Green}✔ " # indicator if the last command returned with an exit code of 0
}

reload_git_prompt_colors "Default Ubuntu"
reload_git_prompt_colors "Default Ubuntu"
3 changes: 1 addition & 2 deletions themes/Solarized_NoExitState_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Solarized NoExitState Ubuntu"
GIT_PROMPT_STAGED="${Yellow}● "
GIT_PROMPT_UNTRACKED="${Cyan}… "
GIT_PROMPT_STASHED="${BoldMagenta}⚑ "
GIT_PROMPT_CLEAN="${Green}✔ "
GIT_PROMPT_COMMAND_OK="${Green}✔ "
Expand All @@ -16,4 +15,4 @@ override_git_prompt_colors() {
GIT_PROMPT_END_ROOT=" \n${BoldBlue}${Time12a}${ResetColor} # "
}

reload_git_prompt_colors "Solarized NoExitState Ubuntu"
reload_git_prompt_colors "Solarized NoExitState Ubuntu"
3 changes: 1 addition & 2 deletions themes/Solarized_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Solarized Ubuntu"
GIT_PROMPT_STAGED="${Yellow}● "
GIT_PROMPT_UNTRACKED="${Cyan}… "
GIT_PROMPT_STASHED="${BoldMagenta}⚑ "
GIT_PROMPT_CLEAN="${Green}✔ "
GIT_PROMPT_COMMAND_OK="${Green}✔ "
GIT_PROMPT_END_USER=" \n${BoldBlue}${Time12a}${ResetColor} $ "
GIT_PROMPT_END_ROOT=" \n${BoldBlue}${Time12a}${ResetColor} # "
}

reload_git_prompt_colors "Solarized Ubuntu"
reload_git_prompt_colors "Solarized Ubuntu"
45 changes: 45 additions & 0 deletions themes/TruncatedPwd_WindowTitle_NoExitState_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##############################################################################
# Changes the prompt to a Debian-style one that truncates pwd to a max length
# depending on the terminal column width. Also uses the prompt_callback
# function of bash-git-prompt to set the window title to almost the same
# Debian-style. This version has been tweaked for Ubuntu standard terminal
# fonts.
#
# The prompt will use a Debian-style on the form
#
# [user@host: <truncated PWD>] [bash-git-prompt-info]
# HH:MM $
#
# The window title will have the form
# user@host: <truncated PWD>
#
# Example usage:
# if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then
# GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_NoExitState_Ubuntu
# source ~/.bash-git-prompt/gitprompt.sh
# fi
#
# oGre <[email protected]> [https://github.com/ogr3]
##############################################################################
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="TruncatedPwd_WindowTitle_NoExitState_Ubuntu"

#Overrides the prompt_callback function used by bash-git-prompt
function prompt_callback {
local PS1="\u@\h: $(gp_truncate_pwd)"
gp_set_window_title "$PS1"
echo -n "[${PS1}]${ResetColor}"
}

GIT_PROMPT_START_USER="${Yellow}"
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
GIT_PROMPT_END_USER="\n${White}${Time12a}${ResetColor} $ "
GIT_PROMPT_END_ROOT="\n${White}${Time12a}${ResetColor} # "

GIT_PROMPT_STAGED="${Red}● " # the number of staged files/directories
GIT_PROMPT_CLEAN="${BoldGreen}✔ " # a colored flag indicating a "clean" repo
GIT_PROMPT_COMMAND_OK="${Green}✔ " # indicator if the last command returned with an exit code of 0
GIT_PROMPT_COMMAND_FAIL="${Red}✘ " # indicator if the last command returned with an exit code of other than 0
}

reload_git_prompt_colors "TruncatedPwd_WindowTitle_NoExitState_Ubuntu"
44 changes: 44 additions & 0 deletions themes/TruncatedPwd_WindowTitle_Ubuntu.bgptheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
##############################################################################
# Changes the prompt to a Debian-style one that truncates pwd to a max length
# depending on the terminal column width. Also uses the prompt_callback
# function of bash-git-prompt to set the window title to almost the same
# Debian-style. This version has been tweaked for Ubuntu standard terminal
# fonts.
#
# The prompt will use a Debian-style on the form
#
# [user@host: <truncated PWD>] [bash-git-prompt-info] <exit status>
# HH:MM $
#
# The window title will have the form
# user@host: <truncated PWD>
#
# Example usage:
# if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then
# GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_Ubuntu
# source ~/.bash-git-prompt/gitprompt.sh
# fi
#
# oGre <[email protected]> [https://github.com/ogr3]
##############################################################################
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="TruncatedPwd_WindowTitle_Ubuntu"

#Overrides the prompt_callback function used by bash-git-prompt
function prompt_callback {
local PS1="\u@\h: $(gp_truncate_pwd)"
gp_set_window_title "$PS1"
echo -n "[${PS1}]${ResetColor}"
}

GIT_PROMPT_START_USER="${Yellow}"
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
GIT_PROMPT_END_USER=" _LAST_COMMAND_INDICATOR_\n${White}${Time12a}${ResetColor} $ "
GIT_PROMPT_END_ROOT=" _LAST_COMMAND_INDICATOR_\n${White}${Time12a}${ResetColor} # "

GIT_PROMPT_STAGED="${Red}● " # the number of staged files/directories
GIT_PROMPT_CLEAN="${BoldGreen}✔ " # a colored flag indicating a "clean" repo
GIT_PROMPT_COMMAND_OK="${Green}✔ " # indicator if the last command returned with an exit code of 0
}

reload_git_prompt_colors "TruncatedPwd_WindowTitle_Ubuntu"

0 comments on commit 40f2d1b

Please sign in to comment.