compton icon indicating copy to clipboard operation
compton copied to clipboard

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

Open Brett99 opened this issue 7 years ago • 5 comments

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?

Brett99 avatar Oct 05 '17 05:10 Brett99

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

0x041E avatar Oct 15 '17 19:10 0x041E

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.

jrudess avatar Feb 04 '18 22:02 jrudess

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.

larkery avatar Mar 22 '18 11:03 larkery

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

jrudess avatar Mar 22 '18 19:03 jrudess

Thanks for the patch @larkery . Works great !

DroidFreak32 avatar Jul 17 '19 23:07 DroidFreak32