sophuwu.site > bashprompt
final touches to the colour pattern
sophuwu sophie@sophuwu.site
Sun, 08 Oct 2023 06:41:56 +0200
commit

40fbb355c784f8a72c610541545ce2a24fbac6f5

parent

a6685166635400d07cec78a6e8596ba9f001c5a4

1 files changed, 2 insertions(+), 3 deletions(-)

jump to
M main.cppmain.cpp

@@ -36,6 +36,7 @@

int randint() { std::srand(std::time(nullptr)); int n = std::rand() & 15; + n*=3; n+=10; return n; }

@@ -87,7 +88,7 @@ if (argc > 1 && argv[1][0] == '!') {

printf("\033[38;2;255;0;180m<3\033[0m "); std::string prompt = makePrompt(count); if (err) printf("%s", prompt.c_str()); - else r.print2d(prompt); + else r.print2d(prompt, 40+count%20-count%13+count%7); return 0; }

@@ -104,8 +105,6 @@ exportEnv("RAINBOWPSG", r.c.g);

exportEnv("RAINBOWPSB", r.c.b); exportEnv("RAINBOWPSC", ++count); printf(" %c", '\n'); - - //export PROMPT_COMMAND="`bashprompt`" return 0; }