chjj / compton

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

Shadows on Bottom Edge of Maximized Windows #116

Closed kenixsis closed 11 years ago

kenixsis commented 11 years ago

Not really much of an issue and more of a question: is there a way to disable shadows on the bottom edge of maximized windows? I can see the shadow over my bottom panel and while not an inconvenience in any way, it would make it look that much more polished. Thank you for your time.

richardgv commented 11 years ago

Indeed it's an issue as we don't have this feature in compton. I've added it to richardgv-dev branch. Suppose your taskbar is on the 16px bottom edge of your screen, use:

compton -c --shadow-exclude-reg x16+0-0

Shadows will then get clipped in the region described by the X geometry. It will be ugly in some cases -- don't blame us, you asked for this. Feel free to report to us if you see any problems.

Sorry, I should have pushed this code out sooner, but I overslept this afternoon.

fleutot commented 7 years ago

Is there a way to limit --shadow-exclude-reg to only one monitor? What I could read about X's geometry doesn't include DISPLAY, X programs have a separate argument for it.

fleutot commented 7 years ago

The answer is yes. For two 1920-wide monitors, xmobar on the right:

shadow-exclude-reg = "1920x18+1921+0"; # do not draw shadow over xmobar

Now I need to detect 1920 automatically, so my compton.conf works on multiple resolutions (hints please?).

richardgv commented 7 years ago

Now I need to detect 1920 automatically, so my compton.conf works on multiple resolutions (hints please?).

Since --shadow-exclude-reg could be specified with a command-line argument, you could simply use xwininfo in a command substitution to acquire the geometry of xmobar on the fly:

compton -c --shadow-exclude-reg "$(xwininfo -name 'xmobar' | pcregrep -o '(?<=^  -geometry ).*')"
yshui commented 6 years ago

This is so absolutely not the correct way to solve this problem. And this option just have so many way of being abused.

This is terrible. Please think things through before you code.