Compton: Disable shadow for maximized windows

Created on 9 Jan 2014  路  2Comments  路  Source: chjj/compton

How to disable shadow in all maximized windows?
It is desirable in the configuration file.
shadow-exclude = max_windows )))

Most helpful comment

  1. If you simply need to use avoid shadow casting on your taskbar or dock, --shadow-exclude-reg is easier to use.
  2. You could match against window x, y, x2, y2 etc. For example, my screen resolution is 1440x900, and I have a taskbar on the top of the screen that maximized windows will not cover, so I could use: --shadow-exclude 'x <= 3 && x2 >= 1337 && y <= 30 && y2 >= 887'
  3. If your WM is fully EWMH-compliant, you could match _NET_WM_STATE with something like:

    --shadow-exclude (_NET_WM_STATE@[0]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[1]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[2]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[3]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[4]:a = "_NET_WM_STATE@_MAXIMIZED_VERT") && (_NET_WM_STATE@[0]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[1]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[2]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[3]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[4]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ")
    
  4. Almost each long commandline switch has an corresponding configuration file option with the same name. Just search compton.sample.conf if you have trouble finding it.

All 2 comments

  1. If you simply need to use avoid shadow casting on your taskbar or dock, --shadow-exclude-reg is easier to use.
  2. You could match against window x, y, x2, y2 etc. For example, my screen resolution is 1440x900, and I have a taskbar on the top of the screen that maximized windows will not cover, so I could use: --shadow-exclude 'x <= 3 && x2 >= 1337 && y <= 30 && y2 >= 887'
  3. If your WM is fully EWMH-compliant, you could match _NET_WM_STATE with something like:

    --shadow-exclude (_NET_WM_STATE@[0]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[1]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[2]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[3]:a = "_NET_WM_STATE@_MAXIMIZED_VERT" || _NET_WM_STATE@[4]:a = "_NET_WM_STATE@_MAXIMIZED_VERT") && (_NET_WM_STATE@[0]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[1]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[2]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[3]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ" || _NET_WM_STATE@[4]:a = "_NET_WM_STATE@_MAXIMIZED_HORZ")
    
  4. Almost each long commandline switch has an corresponding configuration file option with the same name. Just search compton.sample.conf if you have trouble finding it.

Thanks for the detailed answer!
I came in handy the second option. I use xfwm. My resolution 1600x900 and i write in config-file:
shadow-exclude = "x<=3 && x2>= 1600 && y <= 30 && y2 >=853";

See gif
a

Sorry for my english and thanks you again.

Was this page helpful?
0 / 5 - 0 ratings