Feature: Configuration file parsing

- Add support for parsing configuration files using libconfig.
  (Dependency on libconfig could be made optional once we get some
  better building system.) Few tests has been done, bugs to be expected.
  compton searches for a configuration file mostly according to the XDG
  standard. Firstly the configuration file requested by --config, then
  $XDG_CONFIG_HOME/compton.conf (~/.config/compton.conf, usually), then
  ~/.compton.conf, then compton.conf under $XDG_DATA_DIRS (often
  /etc/xdg/compton.conf). A sample configuration file is supplied as
  compton.sample.conf. Configuration file syntax may change in the
  future.  Commandline switches has higher priority than configuration
  file, except for --shadow-exclude. Use --config /dev/null to
  temporarily disable configuration file.

- Fix a bug that causes windows to disappear or be partially rendered on
  opacity changes.

- Fix a bug that causes some windows to ignore -i (inactive_opacity) and
  --inactive-dim, caused by the default window type change in
  a5d9955ca4.
This commit is contained in:
Richard Grenville
2012-09-25 10:19:20 +08:00
parent ce51d564d5
commit ee9e90efec
5 changed files with 522 additions and 165 deletions

29
compton.sample.conf Normal file
View File

@ -0,0 +1,29 @@
# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 7
shadow-offset-x = -7
shadow-offset-y = -7
# shadow-opacity = 0.7
# shadow-red = 0.0
# shadow-green = 0.0
# shadow-blue = 0.0
shadow-exclude = [ "n:e:Notification" ];
# shadow-exclude = "n:e:Notification";
# Opacity
menu-opacity = 0.8;
inactive-opacity = 0.8;
frame-opacity = 0.7;
inactive-opacity-override = true;
# Fading
fading = true;
# fade-delta = 30
fade-in-step = 0.03
fade-out-step = 0.03
# Other
mark-wmwin-focused = true;