From 57279738f16bb6e6391916be0fea3497f6b6f870 Mon Sep 17 00:00:00 2001 From: oGre Date: Mon, 19 Oct 2015 19:24:20 +0200 Subject: [PATCH] Tweaked Ubuntu versions of fonts to only override the symbols from Default that are needed. Added Ubuntu versions of the TruncatedPwd_WindowTitle theme. --- themes/Default_NoExitState_Ubuntu.bgptheme | 3 +- themes/Default_Ubuntu.bgptheme | 3 +- themes/Solarized_NoExitState_Ubuntu.bgptheme | 3 +- themes/Solarized_Ubuntu.bgptheme | 3 +- ...wd_WindowTitle_NoExitState_Ubuntu.bgptheme | 45 +++++++++++++++++++ .../TruncatedPwd_WindowTitle_Ubuntu.bgptheme | 44 ++++++++++++++++++ 6 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 themes/TruncatedPwd_WindowTitle_NoExitState_Ubuntu.bgptheme create mode 100644 themes/TruncatedPwd_WindowTitle_Ubuntu.bgptheme diff --git a/themes/Default_NoExitState_Ubuntu.bgptheme b/themes/Default_NoExitState_Ubuntu.bgptheme index 2af22f3f..27b78a8b 100644 --- a/themes/Default_NoExitState_Ubuntu.bgptheme +++ b/themes/Default_NoExitState_Ubuntu.bgptheme @@ -5,7 +5,6 @@ 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 @@ -13,4 +12,4 @@ override_git_prompt_colors() { GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}" } -reload_git_prompt_colors "Default NoExitState Ubuntu" \ No newline at end of file +reload_git_prompt_colors "Default NoExitState Ubuntu" diff --git a/themes/Default_Ubuntu.bgptheme b/themes/Default_Ubuntu.bgptheme index 7ddf91fb..e68b7b79 100644 --- a/themes/Default_Ubuntu.bgptheme +++ b/themes/Default_Ubuntu.bgptheme @@ -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" \ No newline at end of file +reload_git_prompt_colors "Default Ubuntu" diff --git a/themes/Solarized_NoExitState_Ubuntu.bgptheme b/themes/Solarized_NoExitState_Ubuntu.bgptheme index ae475489..be6be1fd 100644 --- a/themes/Solarized_NoExitState_Ubuntu.bgptheme +++ b/themes/Solarized_NoExitState_Ubuntu.bgptheme @@ -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}✔ " @@ -16,4 +15,4 @@ override_git_prompt_colors() { GIT_PROMPT_END_ROOT=" \n${BoldBlue}${Time12a}${ResetColor} # " } -reload_git_prompt_colors "Solarized NoExitState Ubuntu" \ No newline at end of file +reload_git_prompt_colors "Solarized NoExitState Ubuntu" diff --git a/themes/Solarized_Ubuntu.bgptheme b/themes/Solarized_Ubuntu.bgptheme index a60a0efa..99589c4b 100644 --- a/themes/Solarized_Ubuntu.bgptheme +++ b/themes/Solarized_Ubuntu.bgptheme @@ -4,7 +4,6 @@ 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}✔ " @@ -12,4 +11,4 @@ override_git_prompt_colors() { GIT_PROMPT_END_ROOT=" \n${BoldBlue}${Time12a}${ResetColor} # " } -reload_git_prompt_colors "Solarized Ubuntu" \ No newline at end of file +reload_git_prompt_colors "Solarized Ubuntu" diff --git a/themes/TruncatedPwd_WindowTitle_NoExitState_Ubuntu.bgptheme b/themes/TruncatedPwd_WindowTitle_NoExitState_Ubuntu.bgptheme new file mode 100644 index 00000000..0938144e --- /dev/null +++ b/themes/TruncatedPwd_WindowTitle_NoExitState_Ubuntu.bgptheme @@ -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: ] [bash-git-prompt-info] +# HH:MM $ +# +# The window title will have the form +# user@host: +# +# 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 [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" diff --git a/themes/TruncatedPwd_WindowTitle_Ubuntu.bgptheme b/themes/TruncatedPwd_WindowTitle_Ubuntu.bgptheme new file mode 100644 index 00000000..d41f2c8f --- /dev/null +++ b/themes/TruncatedPwd_WindowTitle_Ubuntu.bgptheme @@ -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: ] [bash-git-prompt-info] +# HH:MM $ +# +# The window title will have the form +# user@host: +# +# Example usage: +# if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then +# GIT_PROMPT_THEME=TruncatedPwd_WindowTitle_Ubuntu +# source ~/.bash-git-prompt/gitprompt.sh +# fi +# +# oGre [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"