Skip to content

Commit

Permalink
Feature: Configuration file parsing
Browse files Browse the repository at this point in the history
- 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
  a5d9955.
  • Loading branch information
richardgv committed Sep 25, 2012
1 parent ce51d56 commit ee9e90e
Show file tree
Hide file tree
Showing 5 changed files with 491 additions and 134 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man/man1

PACKAGES = x11 xcomposite xfixes xdamage xrender xext
PACKAGES = x11 xcomposite xfixes xdamage xrender xext libconfig
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
LIBS += $(shell pcre-config --libs)
INCS = $(shell pkg-config --cflags $(PACKAGES))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ __R__ for runtime
* bash (R)
* xprop,xwininfo / x11-utils (R)
* libpcre (B,R) (Will probably be made optional soon)
* libconfig (B,R) (Will probably be made optional soon)

To build, make sure you have the above dependencies:

Expand Down
29 changes: 29 additions & 0 deletions compton.sample.conf
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit ee9e90e

Please sign in to comment.