final touches to the colour pattern
sophuwu sophie@sophuwu.site
Sun, 08 Oct 2023 06:41:56 +0200
1 files changed,
2 insertions(+),
3 deletions(-)
jump to
M
main.cpp
→
main.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; }