Skip to content

Clean codeword, cooperkid, cupcake theme files #2292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ themes/brainy
themes/brunton
themes/candy
themes/clean
themes/codeword
themes/cooperkid
themes/cupcake
themes/doubletime
themes/doubletime_multiline
themes/doubletime_multiline_pyonly
Expand Down
1 change: 1 addition & 0 deletions themes/codeword/codeword.theme.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

SCM_THEME_PROMPT_PREFIX="${SCM_THEME_PROMPT_SUFFIX:-}"
SCM_THEME_PROMPT_DIRTY="${bold_red?} ✗${normal?}"
Expand Down
22 changes: 13 additions & 9 deletions themes/cooperkid/cooperkid.theme.bash
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
# ------------------------------------------------------------------#
# FILE: cooperkid.zsh-theme #
# BY: Alfredo Bejarano #
# BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net) #
# ------------------------------------------------------------------#

SCM_THEME_PROMPT_DIRTY="${red} ✗${reset_color}"
SCM_THEME_PROMPT_AHEAD="${yellow} ↑${reset_color}"
SCM_THEME_PROMPT_CLEAN="${green} ✓${reset_color}"
SCM_THEME_PROMPT_DIRTY="${red?} ✗${reset_color?}"
SCM_THEME_PROMPT_AHEAD="${yellow?} ↑${reset_color?}"
SCM_THEME_PROMPT_CLEAN="${green?} ✓${reset_color?}"
SCM_THEME_PROMPT_PREFIX=" "
SCM_THEME_PROMPT_SUFFIX=""
GIT_SHA_PREFIX="${blue}"
GIT_SHA_SUFFIX="${reset_color}"
GIT_SHA_PREFIX="${blue?}"
GIT_SHA_SUFFIX="${reset_color?}"

function rvm_version_prompt {
if which rvm &> /dev/null; then
Expand All @@ -27,11 +29,13 @@ function git_short_sha() {

function prompt() {
local return_status=""
local ruby="${red}$(ruby_version_prompt)${reset_color}"
local user_host="${green}\h @ \w${reset_color}"
local git_branch="$(git_short_sha)${cyan}$(scm_prompt_info)${reset_color}"
local ruby
ruby="${red?}$(ruby_version_prompt)${reset_color?}"
local user_host="${green?}\h @ \w${reset_color?}"
local git_branch
git_branch="$(git_short_sha)${cyan?}$(scm_prompt_info)${reset_color?}"
local prompt_symbol=' '
local prompt_char="${purple}>_${reset_color} "
local prompt_char="${purple?}>_${reset_color?} "

PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}"
}
Expand Down
20 changes: 10 additions & 10 deletions themes/cupcake/cupcake.theme.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.

# Emoji-based theme to display source control management and
Expand All @@ -20,20 +20,20 @@ VIRTUALENV_THEME_PROMPT_SUFFIX=""
# SCM prompts
SCM_NONE_CHAR=""
SCM_GIT_CHAR="[±] "
SCM_GIT_BEHIND_CHAR="${red}↓${normal}"
SCM_GIT_AHEAD_CHAR="${bold_green}↑${normal}"
SCM_GIT_BEHIND_CHAR="${red?}↓${normal?}"
SCM_GIT_AHEAD_CHAR="${bold_green?}↑${normal?}"
SCM_GIT_UNTRACKED_CHAR="⌀"
SCM_GIT_UNSTAGED_CHAR="${bold_yellow}•${normal}"
SCM_GIT_STAGED_CHAR="${bold_green}+${normal}"
SCM_GIT_UNSTAGED_CHAR="${bold_yellow?}•${normal?}"
SCM_GIT_STAGED_CHAR="${bold_green?}+${normal?}"

SCM_THEME_PROMPT_DIRTY=""
SCM_THEME_PROMPT_CLEAN=""
SCM_THEME_PROMPT_PREFIX=""
SCM_THEME_PROMPT_SUFFIX=""

# Git status prompts
GIT_THEME_PROMPT_DIRTY=" ${red}✗${normal}"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}"
GIT_THEME_PROMPT_DIRTY=" ${red?}✗${normal?}"
GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓${normal?}"
GIT_THEME_PROMPT_PREFIX=""
GIT_THEME_PROMPT_SUFFIX=""

Expand All @@ -60,19 +60,19 @@ function virtualenv_prompt {

# Rename tab
function tabname {
printf "\e]1;$1\a"
printf "\e]1;%s\a" "$1"
}

# Rename window
function winname {
printf "\e]2;$1\a"
printf "\e]2;%s\a" "$1"
}

# PROMPT OUTPUT ===============================================================

# Displays the current prompt
function prompt_command() {
PS1="\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_red}\u${normal}${icon_host}${bold_cyan}\h${normal}${icon_directory}${bold_purple}\W${normal}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${white}$(scm_prompt_info)${normal}\n${icon_end}"
PS1="\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_red?}\u${normal?}${icon_host}${bold_cyan?}\h${normal?}${icon_directory}${bold_purple?}\W${normal?}\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")${white?}$(scm_prompt_info)${normal?}\n${icon_end}"
PS2="${icon_end}"
}

Expand Down
Loading