vivien / i3blocks-contrib

Official repository for community contributed blocklets
https://github.com/vivien/i3blocks
Other
1.29k stars 485 forks source link

rofi-calendar falls in august and september #261

Open cavo-github opened 4 years ago

cavo-github commented 4 years ago

Hi.

In august or september rofi-calendar falls with:

$ LC_ALL=C BLOCK_BUTTON=3 ./rofi-calendar
./rofi-calendar: line 15: ((: 09: value too great for base (error token is "09")
./rofi-calendar: line 15: 09: value too great for base (error token is "09")

In bash (sh) is 08 and 09 with base 8 and wrong numbers. corrected 15. line of rofi-calendar

        (( 10#$month == 12 )) && month=1 && year=$((year + 1)) || month=$((10#$month + 1)) 

Thanks.

Aster89 commented 4 years ago

With the latest commit on the February the 9th I think this repo is almost dead. However you're right.

I've pushed the change you suggested to one of my own fork's branches which I used for the still pending pull request PR#201.

By the way, thank you for showing the use of # for setting the base of the number, I did not know of this use (in my script I used to have things like ${var#0}, which clearly breaks when there's more than one leading 0).