You are not logged in.

#1 2016-03-28 05:28:29

tpprynn
Member
Registered: 2016-03-28
Posts: 6

Compton and removing shadows for menus

Hello. I've been having first looks at Compton and compton.conf. I'd like all menus on my install to have no shadow, particularly the lxpanel menu and dropdown menus in Libreoffice-writer. I don't know how they'd be labelled in Compton to make them exempt. Does anyone here know? I've tried putting menu, *menu*, dropdown_menu and popup_menu in the same form my compton.conf file uses for Docky, Plank and the like, to no avail.

Thanks.

Offline

#2 2016-03-28 06:34:52

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: Compton and removing shadows for menus

Post your compton.conf.


Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#3 2016-03-28 07:13:57

tpprynn
Member
Registered: 2016-03-28
Posts: 6

Re: Compton and removing shadows for menus

Thanks. It's a pretty basic, almost unaltered one (and despite Chrome being included here, if Compton is on then the menus don't highlight consistently).

backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = "opengl-swc"; 

# These are important. The first one enables the opengl backend. The last one is the vsync method. Depending on the driver you might need to use a different method.
# The other options are smaller performance tweaks that work well in most cases. 
# You can find the rest of the options here: [url]https://github.com/chjj/compton/wiki/perf-guide[/url], and here: [url]https://github.com/chjj/compton/wiki/vsync-guide[/url]


# Shadow
shadow = true;			# Enabled client-side shadows on windows.
no-dock-shadow = false;		# Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true;		# Don't draw shadows on DND windows.
clear-shadow = true;		# Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 8;		# The blur radius for shadows. (default 12)
shadow-offset-x = -11;		# The left offset for shadows. (default -15)
shadow-offset-y = -10;		# The top offset for shadows. (default -15)
shadow-opacity = 0.4;
menu-opacity = 0.98;
shadow-exclude = [
 "! name~=''",
 #"n:e:Notification",
 "n:e:Plank",
 "n:e:Docky",
 "g:e:Synapse",
 "g:e:Kupfer",
 "g:e:Conky",
 "n:w:Firefox",
 "n:w:*Chrome*",
 "n:w:*Chromium*",
 "class_g ?= 'Notify-osd'",
 "class_g ?= 'Cairo-dock'",
 "class_g ?= 'Xfce4-notifyd'",
 "class_g ?= 'Xfce4-power-manager'"
];

# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches 
# (most applications are fine, only apps that do weird things with xshapes or argb are affected). 
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.

# Fading
fading = true; # Fade windows during opacity changes.
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
no-fading-openclose = false; # Fade windows in/out when opening/closing

detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what.

# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; };
};

Mod Note: Added code tags.
-HoaS

Last edited by Head_on_a_Stick (2016-03-28 07:49:44)

Offline

#4 2016-03-28 07:38:56

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 532

Re: Compton and removing shadows for menus

shadow-exclude = [ "n:e:Menu" ];

seems to work, so try adding

"n:e:Menu"

in your exclude list after Plank and Docky.

Last edited by nore (2016-03-28 07:41:52)

Offline

#5 2016-03-28 07:51:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Compton and removing shadows for menus

Moved to GUI & Applications


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2016-03-28 08:01:28

tpprynn
Member
Registered: 2016-03-28
Posts: 6

Re: Compton and removing shadows for menus

I'm afraid that doesn't work, no. The shadows remain on all menus except Firefox ones.

Offline

#7 2016-03-28 11:39:57

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Compton and removing shadows for menus

Does this work:

pkill compton && compton -CGb

http://ubuntuforums.org/archive/index.p … 12440.html


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#8 2016-03-28 18:50:18

tpprynn
Member
Registered: 2016-03-28
Posts: 6

Re: Compton and removing shadows for menus

Sadly not, no. To look at this another way, is it possible to have shadows on program window borders only and the vsync functions? I'm imagining it can be done somehow if XFWM manages it.

Thanks.

Offline

#9 2016-03-31 19:34:09

yunn
Member
From: Madrid
Registered: 2015-09-29
Posts: 67
Website

Re: Compton and removing shadows for menus

Hi @tpprynn, can you try the next one settings ?

#Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; };
  menu = { shadow = false; };
  dropdown_menu = { shadow = false; };
  popup_menu =  { shadow = false; };
};

Regards,

Offline

#10 2016-04-02 17:36:02

tpprynn
Member
Registered: 2016-03-28
Posts: 6

Re: Compton and removing shadows for menus

Yes, many thanks, this has worked. Interesting! This all looks and behaves very cleanly to my mind and eye now.

One thing though is that LibreOffice Writer still maintains shadows around its dropdown menus. LibreOffice seems to go its own way in a lot of ways but I wondered if its menus are a different type not covered by those in the code you've just given me. I was fussy enough as well to start to enquire about the possibility of creating a bash script that would both switch Compton off, send Writer and Firefox to fullscreen mode and theh switch Compton back on when they were exited. (The .compton.conf file didn't seem to recognise Libre Office any way I added it, for whatever reason.) I think I may have hoped for too much there, but I will make periodic attempts to acquire the right knowledge to come up with this script in time.

Offline

#11 2016-04-02 18:39:14

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,779

Re: Compton and removing shadows for menus

I think you'd have to address each element in LibreOffice specifically: lowriter, loimpress, localc and lodraw.

That bash script idea sounds interesting too.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#12 2016-04-02 18:45:43

yunn
Member
From: Madrid
Registered: 2015-09-29
Posts: 67
Website

Re: Compton and removing shadows for menus

tpprynn wrote:

One thing though is that LibreOffice Writer still maintains shadows around its dropdown menus. LibreOffice seems to go its own way in a lot of ways but I wondered if its menus are a different type not covered by those in the code you've just given me.

Hi @tpprynn, don't worry for LibreOffine, only it's necesary include >> utility =  { shadow = false; };

Finally;

#Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; };
  menu = { shadow = false; };
  dropdown_menu = { shadow = false; };
  popup_menu =  { shadow = false; };
  utility =  { shadow = false; };
};

For more information,
http://entornosgnulinux.com/2016/03/31/ … -hydrogen/

Regards, smile

Offline

#13 2016-04-02 19:18:26

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,779

Re: Compton and removing shadows for menus

@yunn - Excellent write up!  Must cruise around your site.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB