chjj / compton

A compositor for X11.
Other
2.25k stars 501 forks source link

How can I get compton not to draw shadows over polybar? #449

Open Brett99 opened 7 years ago

Brett99 commented 7 years ago

I have polybar the the bottom of my screen. My windows are in front of it, but my window manager never makes windows cover polybar unless they are fullscreen.

If there is a window close to the bottom, the shadow is drawn over polybar and it makes the text hard to read. Is there a way to make compton not draw shadows on top of polybar, without putting polybar above the window?

0x041E commented 7 years ago

Compton has shadow-exclude-reg option with which you can specify a region where shadows will not be drawn therefore you can specify region where your polybar is located for example --shadow-exclude-reg 1600x10+0+0 the region syntax go as follows WxH[+-]top[+-]left where W - width, H - height, top - pixels from top (if negative - from the bottom border), left - pixels from the left border (if negative - then from the right border). Since you've said your bar is on the bottom then use WxH+0-0 so the region is on the bottom and it should work. To easily find out region of your polybar you can use the xwininfo command and click on the bar which directly shows you the geometry in the output for example -geometry 1600x15-0+0 and use that for compton

jrudess commented 6 years ago

shadow-exclude-reg doesn't appear to support an array like shadow-exclude does. I have three monitors where the middle is 2560x1600 and the left/right are 1920x1200. If I use shadow-exclude-reg = "x26+0+0", then no shadow is drawn on the middle monitors polybar, but I still get the shadows on the other two monitors.

Does anyone have a suggestion for how to deal with compton drawing over polybar in a multi-monitor setup? I have not been able to find a way to use name/class in shadow-exclude.

larkery commented 6 years ago

I have a patch for this if you want at https://github.com/larkery/compton.git This just avoids drawing shadows on any NET_WM_DOCK window.

jrudess commented 6 years ago

Thanks for the patch, works perfectly for a multi-monitor setup.

DroidFreak32 commented 5 years ago

Thanks for the patch @larkery . Works great !