himdel / hsetroot

yet another wallpaper application
GNU General Public License v2.0
124 stars 21 forks source link

[RFC] Set the default alpha value to 0 #27

Closed blochl closed 4 years ago

blochl commented 4 years ago

I am aware that this PR changes the default behavior, therefore it is an RFC only - please share your thoughts

The problem:

When using Compton/Picom, one can not use xsetroot to change the background and hsetroot is needed (more details here). However, when setting the background with hsetroot, even in the very top of .xinitrc, there still is a short blink of gray on fast-loading systems. This behavior does not occur with xsetroot, as the initial/default color is black.

The solution in this commit:

Set the default alpha value from 255 to 0, so that the initial/default color will be black as well, thus mimicing the behavior of xsetroot.

blochl commented 4 years ago

Resolved, by:

sed -i '/-solid/ s/#303030/#000000/' /usr/lib/openbox/openbox-autostart

Apparently, Openbox is executing /usr/lib/openbox/openbox-autostart in any case, even if there is a ~/.config/openbox/autostart present. So even if I set the background to a certain color before Openbox starts, it will momentarily blink with '#303030' because of that. Closing, thanks!

himdel commented 4 years ago

Glad you found the solution, thanks! :)