mobsenpai / sugoi

すごい Sugoi | Comfy environment for AwesomeWM
https://awesomewm.org
GNU General Public License v3.0
36 stars 1 forks source link

Fix potential division by 0 #1

Closed brooksvb closed 9 months ago

brooksvb commented 9 months ago

Calling lighten with (#000000, 5) causes a division by 0 and subsequent errors

brooksvb commented 9 months ago

This line caused the error for me trying to use your theme out of the box: https://github.com/MobSenpai/sugoi/blob/262f08e36a5cc8322d434c78ba237fd31b4ec686/themes/gruva/theme.lua#L50

mobsenpai commented 9 months ago

This line caused the error for me trying to use your theme out of the box:

https://github.com/MobSenpai/sugoi/blob/262f08e36a5cc8322d434c78ba237fd31b4ec686/themes/gruva/theme.lua#L50

Ahh now I get it. I forgot to include the xresources file, so maybe you used a different xresource with the color, that threw error. I will include it tomorrow. Just asking if it is working after this pr?

brooksvb commented 9 months ago

If you mean my change fixed the error by preventing division by zero, allowing the config to work out of the box, sort of. It doesn't error, but it looks like there is some issue with the color scheme I haven't looked into yet, so I switched back to my own theme.

image

I'm not 100% just using your config out of the box though. I've sorta merged a lot of your stuff into my existing config. I'm not using your bar or your custom widgets. But I would have expected that the theme should still work fine since all the colors are coming from beautiful theming.

It probably is just due to not having the Xresources. I haven't used that file before because I really dislike the cumbersome format