From d7d4cb9807d34c02250e58611554e5c852a9e932 Mon Sep 17 00:00:00 2001 From: Avasz Date: Fri, 9 Dec 2016 10:35:09 +0545 Subject: [PATCH 1/2] kitsune theme --- themes/kitsune/kitsune.theme.bash | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 themes/kitsune/kitsune.theme.bash diff --git a/themes/kitsune/kitsune.theme.bash b/themes/kitsune/kitsune.theme.bash new file mode 100644 index 00000000..36cc0dbe --- /dev/null +++ b/themes/kitsune/kitsune.theme.bash @@ -0,0 +1,35 @@ +# This is modified morris theme for bash-it. I have changed only the way PS1 looks than in morris. +# prompt theming + +# added TITLEBAR for updating the tab and window titles with the pwd +case $TERM in + xterm*) + TITLEBAR=$(printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") + ;; + screen) + TITLEBAR=$(printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") + ;; + *) + TITLEBAR="" + ;; +esac +if [ "$?" == "0" ] +then + SC="${green}^_^"; +else + SC="${red}T_T"; +fi +BC=`battery_percentage` +function prompt_command() { + #PS1="${TITLEBAR}[\u@\h \W $(scm_prompt_info)]\$ " + PS1="\n${cyan}┌─${bold_white}[\u@\h]${cyan}─${bold_yellow}(\w)$(scm_prompt_info)\n${cyan}└─${bold_green}[\A]-${green}($BC%)${bold_cyan}-[${green}${bold_green}\$${bold_cyan}]${green} " +} + +# scm theming +SCM_THEME_PROMPT_DIRTY=" ${red}✗" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" +SCM_THEME_PROMPT_PREFIX="${bold_cyan}(" +SCM_THEME_PROMPT_SUFFIX="${bold_cyan})${reset_color}" + + +safe_append_prompt_command prompt_command From 966a2bb383ea9068693c01781c6f1df7e27faa44 Mon Sep 17 00:00:00 2001 From: Avasz Date: Fri, 9 Dec 2016 10:40:42 +0545 Subject: [PATCH 2/2] Added credits --- themes/kitsune/kitsune.theme.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/themes/kitsune/kitsune.theme.bash b/themes/kitsune/kitsune.theme.bash index 36cc0dbe..c339f54c 100644 --- a/themes/kitsune/kitsune.theme.bash +++ b/themes/kitsune/kitsune.theme.bash @@ -1,4 +1,7 @@ -# This is modified morris theme for bash-it. I have changed only the way PS1 looks than in morris. +# This is combination of works from two different people which I combined for my requirement. +# Original PS1 was from reddit user /u/Allevil669 which I found in thread: https://www.reddit.com/r/linux/comments/1z33lj/linux_users_whats_your_favourite_bash_prompt/ +# I used that PS1 to the bash-it theme 'morris', and customized it to my liking. All credits to /u/Allevil669 and morris. +# # prompt theming # added TITLEBAR for updating the tab and window titles with the pwd