Closed 0xN1nja closed 1 month ago
Can reproduce, error is here
@AzhamProdLive wrong command. -r
flag is used to run a random colorscript.
@AzhamProdLive wrong command.
-r
flag is used to run a random colorscript.
Yeah I noticed after I sent it, you just happen to have bad luck, it works on my machine after 22 try
That's weird :/ are you using the latest colorscript?
Yes, I do have the latest
I think maybe your colorscript is not able to execute any other ascii art (zwaves in my case). Can you check it once?
I get all of them, from those I still have (so only 8), can't reproduce
Hello, is a legit bug as seen here https://gitlab.com/dwt1/shell-color-scripts/-/commit/32e2feefcdd01dcf348b22749ffd9875f8438b25 But the version that the dotfiles use is this https://github.com/charitarthchugh/shell-color-scripts. Before, I used the one from Derek Taylor Distro Tube but it kept getting bloated and I changed to the recent one.
I can't reproduce the bug either since it appears, in my case it took me 9 attempts.
2 new themes are coming, and a bluetooth manager in rofi with his respective polybar module.
I finally found the bug. It's on line 26 of colorscript. We are starting the random_index
from 1; not 0, which is why the "nth" (last) script is not being executed.
Whenever there were 2 scripts in the colorscripts directory, only 1 was being executed. When there were 3 scripts in the colorscripts directory, only 2 were being executed randomly. And when there were 4 scripts, only 3 were being executed randomly.
Hence, n-1 scripts were being executed. The "nth" script (or the last script) was never being executed.
So, I changed the random_index
from:
declare -i random_index=$RANDOM%$length_colorscripts
to:
declare -i random_index=$((RANDOM % length_colorscripts + 1))
It took me a lot of time to figure this out, but now it's working. I don't know how it was working for you all, maybe you were missing something.
So, this issue has been happening since I added your latest colorscript to my config. The colorscript is not executing
zwaves
. It is executable when run manually:Even colorscript can execute it:
But the
colorscript -r
command never executes it. I've tried runningcolorscript -r
over 50 times, but not a single time it executedzwaves
. This is very weird, I don't know why it's happening.zwaves
even gets listed in the output ofcolorscript -l
: