bash-git-prompt/gpthemes.sh
2025-02-03 12:59:23 +01:00

117 lines
5.0 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#################################################################################################
# First Created: 14012025 Author: Allan Desc: Displays the available themes for bash-git-prompt #
#################################################################################################
#
# Define variables and functions
#
themedir="$HOME/.bash-git-prompt/themes"
allthemes=$(ls -la $themedir |grep "bgptheme" |sed s'/.bgptheme//g' |awk '{print $9}')
activetheme=$(cat /$HOME/.bashrc |grep "GIT_PROMPT_THEME" |awk -F'=' '{print $2}')
#
# Define colors
#
# Arrow Color
arrow_black_blue=$(echo "\e[30;48;5;25m")
arrow_blue_white=$(echo "\e[38;5;25;107m")
arrow_white_black=$(echo "\e[97;40m")
arrow_blue_gold=$(echo "\e[38;5;25;48;5;178m")
arrow_gold_black=$(echo "\e[38;5;178;40m")
arrow_blue_orange=$(echo "\e[38;5;25;48;5;208m")
arrow_orange_black=$(echo "\e[38;5;208;40m")
# Half Circle Color
circle_orange_black=$(echo "\e[38;5;208;40m")
circle_black_orange=$(echo "\e[30;48;5;208m")
circle_yellow_black=$(echo "\e[38;5;226;40m")
circle_black_yellow=$(echo "\e[30;48;5;226m")
yellow_black=$(echo "\e[38;5;226;40m")
orange_orange=$(echo "\e[38;5;208;48;5;208m")
yellow_yellow=$(echo "\e[38;5;226;48;5;226m")
lambda_symbol=$(echo "\e[38;5;208;40;1m")
hazard_symbol=$(echo "\e[38;5;226;40m")
redc=$(echo "\e[38;5;196m")
redbc=$(echo "\e[38;5;196;1m")
bluec=$(echo "\e[38;5;69m")
bluebc=$(echo "\e[38;5;69;1m")
greenc=$(echo "\e[38;5;41m")
greenbc=$(echo "\e[38;5;41;1m")
yellowc=$(echo "\e[38;5;226m")
yellowbc=$(echo "\e[38;5;226;1m")
purplec=$(echo "\e[38;5;170m")
purplebc=$(echo "\e[38;5;170;1m")
cyanc=$(echo "\e[38;5;117m")
cyanbc=$(echo "\e[38;5;117;1m")
goldc=$(echo "\e[38;5;178m")
goldbc=$(echo "\e[38;5;178;1m")
whitec=$(echo "\e[97m")
whitebc=$(echo "\e[97;1m")
white_goldc=$(echo "\e[97;48;5;178m")
white_goldbc=$(echo "\e[97;48;5;178;1m")
white_bluec=$(echo "\e[97;48;5;25m")
white_bluebc=$(echo "\e[97;48;5;25;1m")
white_blackc=$(echo "\e[30;107m")
white_blackbc=$(echo "\e[30;107;1m")
black_orangec=$(echo "\e[30;48;5;208m")
black_orangebc=$(echo "\e[30;48;5;208;1m")
black_yellowc=$(echo "\e[30;48;5;226m")
black_yellowbc=$(echo "\e[30;48;5;226;1m")
white_redc=$(echo "\e[97;48;5;196m")
white_redbc=$(echo "\e[97;48;5;196;1m")
resetc=$(echo "\e[0m")
# Arrow Color
arrow_black_blue=$(echo "\e[30;48;5;25m")
arrow_blue_white=$(echo "\e[38;5;25;107m")
arrow_white_black=$(echo "\e[97;40m")
arrow_blue_gold=$(echo "\e[38;5;25;48;5;178m")
arrow_gold_black=$(echo "\e[38;5;178;40m")
arrow_blue_orange=$(echo "\e[38;5;25;48;5;208m")
arrow_orange_black=$(echo "\e[38;5;208;40m")
# Half Circle Color
circle_orange_black=$(echo "\e[38;5;208;40m")
circle_black_orange=$(echo "\e[30;48;5;208m")
circle_yellow_black=$(echo "\e[38;5;226;40m")
circle_black_yellow=$(echo "\e[30;48;5;226m")
yellow_black=$(echo "\e[38;5;226;40m")
orange_orange=$(echo "\e[38;5;208;48;5;208m")
yellow_yellow=$(echo "\e[38;5;226;48;5;226m")
lambda_symbol=$(echo "\e[38;5;208;40;1m")
hazard_symbol=$(echo "\e[38;5;226;40m")
clear ; printf "\n"
printf "Bash Git Promt Themes.........................................\n\n"
printf " ${goldc}~/work/somedir ${whitec}[${purplec}main ${redc}●3 ${bluec}✚1 ${cyanc}…1${whitec}]${resetc}\t\t\tdefault\n\n"
printf " [${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${whitec}]${goldc} ~/work/somedir${whitec} $ ${resetc}\t\tx-files\n\n"
printf " ${whitec}[23:44][${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${whitec}]${goldc} ~/work/somedir${whitec} $ ${resetc}\tx-files-time\n\n"
printf " ${greenc}${goldc}somedir ${whitec}[${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${whitec}]${resetc}\t\t\trobby-russell\n\n"
printf " ${greenc} ${whitec}[${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${whitec}]${goldc} ~/work/somedir${whitec} ${resetc}\tthis-way\n\n"
printf " ${whitec}┌──[${goldc}~/work/somedir ${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${resetc}]\t\ttwo-liner\n └─$ \n\n"
printf " ${whitec}┌──[23:44${goldc} ~/work/somedir ${cyanc} main ${redc}3 ${bluec}+1 ${greenc}1${resetc}]\ttwo-liner-time\n └─$ \n\n"
printf " ${arrow_black_blue}${white_bluec}  main 3 +1 1${arrow_blue_white}${white_blackc}~/work/somedir${arrow_white_black}${resetc}\t\tfancy-white\n\n"
printf " ${arrow_black_blue}${white_bluec}  main 3 +1 1${arrow_blue_orange}${black_orangec}~/work/somedir${arrow_orange_black}${resetc}\t\tfancy-orange\n\n"
printf " ${arrow_black_blue}${white_bluec}  main 3 +1 1${arrow_blue_gold}${white_goldc}~/work/somedir${arrow_gold_black}${resetc}\t\tfancy-gold\n\n"
printf " ${circle_orange_black}${circle_black_orange}${lambda_symbol}λ${resetc}${circle_black_orange}${xf_reset}${black_orangec}  main 3 +1 1 ~/work/somedir${circle_orange_black}${resetc}\t\thalf-life\n\n"
printf " ${circle_yellow_black}${circle_black_yellow}${hazard_symbol}${circle_black_yellow}${resetc}${circle_black_yellow}  main 3 +1 1 ~/work/somedir${circle_yellow_black}${resetc}\t\thazard\n\n"
#
# End of script
#