Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ themes/atomic
themes/axin
themes/bakke
themes/barbuk
themes/base.theme.bash
themes/binaryanomaly
themes/bira
themes/bobby
Expand All @@ -53,19 +52,28 @@ themes/clean
themes/codeword
themes/cooperkid
themes/cupcake
themes/demula
themes/dos
themes/doubletime
themes/doubletime_multiline
themes/doubletime_multiline_pyonly
themes/dulcie
themes/duru
themes/easy
themes/elixr
themes/emperor
themes/envy
themes/essential
themes/githelpers.theme.bash
themes/font
themes/gallifrey
themes/gitline
themes/hawaii50
themes/inretio
themes/iterate
themes/kitsune
themes/lambda
themes/liquidprompt
themes/luan
themes/modern
themes/norbu
themes/oh-my-posh
Expand Down
3 changes: 2 additions & 1 deletion themes/agnoster/agnoster.theme.bash
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ prompt_histdt() {
}

git_status_dirty() {
dirty=$(git status -s 2> /dev/null | tail -n 1)
local dirty=
dirty=$(git status --porcelain 2> /dev/null | tail -n 1)
[[ -n $dirty ]] && echo " ●"
}

Expand Down
54 changes: 17 additions & 37 deletions themes/demula/demula.theme.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

# Theme inspired on:
# - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/
Expand All @@ -10,40 +11,18 @@
# Screenshot: http://goo.gl/VCmX5
# by Jesus de Mula <[email protected]>

# For the real Monokai colors you should add these to your .XDefaults or
# terminal configuration:
#! ----------------------------------------------------------- TERMINAL COLORS
#! monokai - http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
#*background: #272822
#*foreground: #E2DA6E
#*color0: black
#! mild red
#*color1: #CD0000
#! light green
#*color2: #A5E02D
#! orange (yellow)
#*color3: #FB951F
#! "dark" blue
#*color4: #076BCC
#! hot pink
#*color5: #F6266C
#! cyan
#*color6: #64D9ED
#! gray
#*color7: #E5E5E5

# ----------------------------------------------------------------- COLOR CONF
D_DEFAULT_COLOR="${normal}"
D_INTERMEDIATE_COLOR="${white}"
D_USER_COLOR="${purple}"
D_SUPERUSER_COLOR="${red}"
D_MACHINE_COLOR="${cyan}"
D_DIR_COLOR="${green}"
D_SCM_COLOR="${yellow}"
D_BRANCH_COLOR="${yellow}"
D_CHANGES_COLOR="${white}"
D_CMDFAIL_COLOR="${red}"
D_VIMSHELL_COLOR="${cyan}"
D_DEFAULT_COLOR="${normal?}"
D_INTERMEDIATE_COLOR="${white?}"
D_USER_COLOR="${purple?}"
D_SUPERUSER_COLOR="${red?}"
D_MACHINE_COLOR="${cyan?}"
D_DIR_COLOR="${green?}"
D_SCM_COLOR="${yellow?}"
D_BRANCH_COLOR="${yellow?}"
D_CHANGES_COLOR="${white?}"
D_CMDFAIL_COLOR="${red?}"
D_VIMSHELL_COLOR="${cyan?}"

# ------------------------------------------------------------------ FUNCTIONS
case $TERM in
Expand All @@ -56,7 +35,7 @@ case $TERM in
esac

is_vim_shell() {
if [ ! -z "$VIMRUNTIME" ]; then
if [ -n "$VIMRUNTIME" ]; then
echo "${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}\
vim shell${D_DEFAULT_COLOR} "
fi
Expand All @@ -72,7 +51,7 @@ $code ${D_DEFAULT_COLOR}"

# vcprompt for scm instead of bash_it default
demula_vcprompt() {
if [ ! -z "$VCPROMPT_EXECUTABLE" ]; then
if [ -n "$VCPROMPT_EXECUTABLE" ]; then
local D_VCPROMPT_FORMAT="on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:\
${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
$VCPROMPT_EXECUTABLE -f "$D_VCPROMPT_FORMAT"
Expand All @@ -88,7 +67,8 @@ safe_battery_charge() {

# -------------------------------------------------------------- PROMPT OUTPUT
prompt() {
local LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)
local LAST_COMMAND_FAILED
LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)
local SAVE_CURSOR='\033[s'
local RESTORE_CURSOR='\033[u'
local MOVE_CURSOR_RIGHTMOST='\033[500C'
Expand Down
2 changes: 2 additions & 0 deletions themes/dos/dos.theme.bash
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
PROMPT="\w>>"
29 changes: 15 additions & 14 deletions themes/emperor/emperor.theme.bash
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_DIRTY=" ${red?}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓"
SCM_THEME_PROMPT_PREFIX=" |"
SCM_THEME_PROMPT_SUFFIX="${green}|"
SCM_THEME_PROMPT_SUFFIX="${green?}|"

GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX=" ${green}|"
GIT_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red?}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓"
GIT_THEME_PROMPT_PREFIX=" ${green?}|"
GIT_THEME_PROMPT_SUFFIX="${green?}|"

RVM_THEME_PROMPT_PREFIX="|"
RVM_THEME_PROMPT_SUFFIX="|"

function get_hour_color {
hour_color=$red
hour_color=${red?}
min=$(date +%M)
if [ "$min" -lt "15" ]; then
hour_color=$white
hour_color=${white?}
elif [ "$min" -lt "30" ]; then
hour_color=$green
hour_color=${green?}
elif [ "$min" -lt "45" ]; then
hour_color=$yellow
hour_color=${yellow?}
else
hour_color=$red
hour_color=${red?}
fi
echo "$hour_color"
}
Expand All @@ -34,7 +35,7 @@ __emperor_clock() {
}

function prompt_command() {
PS1="\n$(__emperor_clock)${purple}\h ${reset_color}in ${prompt_color}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
PS1="\n$(__emperor_clock)${purple?}\h ${reset_color?}in ${prompt_color?}\w\n${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info) ${green?}→${reset_color?} "
}

THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H "}
Expand Down
22 changes: 12 additions & 10 deletions themes/envy/envy.theme.bash
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

SCM_THEME_PROMPT_DIRTY=" ${red?}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓"
SCM_THEME_PROMPT_PREFIX=" |"
SCM_THEME_PROMPT_SUFFIX="${green}|"
SCM_THEME_PROMPT_SUFFIX="${green?}|"

GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX=" ${green}|"
GIT_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red?}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓"
GIT_THEME_PROMPT_PREFIX=" ${green?}|"
GIT_THEME_PROMPT_SUFFIX="${green?}|"

VIRTUALENV_THEME_PROMPT_PREFIX="${green}ⓔ "
VIRTUALENV_THEME_PROMPT_PREFIX="${green?}ⓔ "
VIRTUALENV_THEME_PROMPT_SUFFIX=""

function prompt_command() {
PS1="\n$(virtualenv_prompt)${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
PS1="\n$(virtualenv_prompt)${yellow?}$(ruby_version_prompt) ${purple?}\h ${reset_color?}in ${green?}\w\n${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info) ${green?}→${reset_color?} "
}

safe_append_prompt_command prompt_command
23 changes: 12 additions & 11 deletions themes/font/font.theme.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
#
# One line prompt showing the following configurable information
# for git:
Expand All @@ -22,20 +23,20 @@
#

SCM_NONE_CHAR=''
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_DIRTY=" ${red?}✗"
SCM_THEME_PROMPT_CLEAN=""
SCM_THEME_PROMPT_PREFIX="${green}|"
SCM_THEME_PROMPT_SUFFIX="${green}|"
SCM_THEME_PROMPT_PREFIX="${green?}|"
SCM_THEME_PROMPT_SUFFIX="${green?}|"
SCM_GIT_SHOW_MINIMAL_INFO=true

CLOCK_THEME_PROMPT_PREFIX=''
CLOCK_THEME_PROMPT_SUFFIX=' '
THEME_SHOW_CLOCK=false
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_blue"}
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_blue?"}
THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%I:%M:%S"}

THEME_SHOW_USER_HOST=true
USER_HOST_THEME_PROMPT_PREFIX="${bold_black}"
USER_HOST_THEME_PROMPT_PREFIX="${bold_black?}"
USER_HOST_THEME_PROMPT_SUFFIX=" "

VIRTUALENV_THEME_PROMPT_PREFIX='('
Expand All @@ -45,20 +46,20 @@ function prompt_command() {
# This needs to be first to save last command return code
local RC="$?"

hostname="${bold_black}\u@\h"
virtualenv="${white}$(virtualenv_prompt)"
hostname="${bold_black?}\u@\h"
virtualenv="${white?}$(virtualenv_prompt)"

# Set return status color
if [[ ${RC} == 0 ]]; then
ret_status="${bold_green}"
ret_status="${bold_green?}"
else
ret_status="${bold_red}"
ret_status="${bold_red?}"
fi

# Append new history lines to history file
history -a

PS1="$(clock_prompt)${virtualenv}$(user_host_prompt)${bold_cyan}\W $(scm_prompt_char_info)${ret_status}→ ${normal}"
PS1="$(clock_prompt)${virtualenv}$(user_host_prompt)${bold_cyan?}\W $(scm_prompt_char_info)${ret_status}→ ${normal?}"
}

safe_append_prompt_command prompt_command
22 changes: 12 additions & 10 deletions themes/gallifrey/gallifrey.theme.bash
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# scm theming
SCM_THEME_PROMPT_PREFIX="${yellow}("
SCM_THEME_PROMPT_SUFFIX=")${normal}"
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

SCM_THEME_PROMPT_PREFIX="${yellow?}("
SCM_THEME_PROMPT_SUFFIX=")${normal?}"

SCM_THEME_PROMPT_DIRTY="*"
SCM_THEME_PROMPT_CLEAN=""
SCM_GIT_CHAR="${green}±${normal}"
SCM_SVN_CHAR="${bold_cyan}⑆${normal}"
SCM_HG_CHAR="${bold_red}☿${normal}"
SCM_GIT_CHAR="${green?}±${normal?}"
SCM_SVN_CHAR="${bold_cyan?}⑆${normal?}"
SCM_HG_CHAR="${bold_red?}☿${normal?}"

### TODO: openSUSE has already colors enabled, check if those differs from stock
# LS colors, made with http://geoff.greer.fm/lscolors/
Expand All @@ -16,10 +18,10 @@ SCM_HG_CHAR="${bold_red}☿${normal}"
gallifrey_prompt() {
SCM_PROMPT_FORMAT='%s%s'

ps_host="${green}\h${normal}"
ps_user_mark="${bold}\$${normal}"
ps_root_mark="${normal}§"
ps_path="${normal}\w"
ps_host="${green?}\h${normal?}"
ps_user_mark="${bold?}\$${normal?}"
ps_root_mark="${normal?}§"
ps_path="${normal?}\w"

# make it work
case $(id -u) in
Expand Down
Loading
Loading