Skip to content

Commit 9399db5

Browse files
committed
update readme and man page.
1 parent 7ace6ca commit 9399db5

File tree

3 files changed

+233
-83
lines changed

3 files changed

+233
-83
lines changed

LICENSE

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
compton - a compositor for X11
22

3+
Contributors
4+
35
Based on xcompmgr, originally written by Keith Packard, with modifications
46
from several contributors (according to the xcompmgr man page): Matthew Allum,
57
Eric Anholt, Dan Doel, Thomas Luebking, Matthew Hawn, Ely Levy, Phil Blundell,
68
and Carl Worth. Menu transparency was implemented by Dana Jansens.
79

10+
Numerous contributions to compton from Richard Grenville.
11+
812
xcompmgr
913

1014
Copyright © 2003 Keith Packard

README.md

+135-55
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ partially doing this out of a desire to learn Xlib.
1717
* shadows are now enabled for argb windows, e.g. terminals with transparency
1818
* removed serverside shadows (and simple compositing) to clean the code,
1919
the only option that remains is clientside shadows
20-
21-
The above features give compton a feature set similar to the xfce compositor.
22-
23-
Compton has only been tested with openbox so far, but frame transparency
24-
should work with any window manager that properly sets `_NET_FRAME_EXTENTS`.
20+
* configuration files (specified with `--config`)
21+
* colored shadows (with `--shadow-[red/green/blue] value`)
22+
* a new fade system
23+
* vsync (still under development)
24+
* several more options
2525

2626
## Fixes from the original xcompmgr:
2727

2828
* fixed a segfault when opening certain window types
2929
* fixed a memory leak caused by not freeing up shadows (from the freedesktop
3030
repo)
31+
* fixed the conflict with chromium and similar windows
32+
* [many more](https://github.com/chjj/compton/issues)
3133

3234
## Building
3335

34-
The same dependencies as xcompmgr.
35-
3636
### Dependencies:
3737

3838
__B__ for build-time
@@ -60,67 +60,147 @@ $ make
6060
$ make install
6161
```
6262

63-
## Usage
63+
## Example Usage
6464

6565
``` bash
66-
$ compton -cC -i 0.6 -e 0.6
6766
$ compton -cC -i 0.6 -e 0.6 -fF
68-
$ compton -cC -fF -I 0.065 -O 0.065 -D 6 -m 0.8 -i 0.6 -e 0.6
67+
$ compton --config ~/compton.conf
68+
```
69+
70+
### Options and Configuration
71+
72+
```
73+
compton [-d display] [-r radius] [-o opacity]
74+
[-l left-offset] [-t top-offset]
75+
[-i opacity] [-e opacity] [-cCfFSdG]
76+
[--config path] [--shadow-red value]
77+
[--shadow-gren value] [--shadow-blue value]
78+
[--inactive-opacity-override] [--inactive-dim value]
79+
[--mark-wmwin-focused] [--shadow-exclude condition]
80+
[--mark-ovredir-focused] [--no-fading-openclose]
81+
[--shadow-ignore-shaped] [--detect-round-corners]
82+
```
83+
84+
* `-d` __display__:
85+
Which display should be managed.
86+
* `-r` __radius__:
87+
The blur radius for shadows. (default 12)
88+
* `-o` __opacity__:
89+
The translucency for shadows. (default .75)
90+
* `-l` __left-offset__:
91+
The left offset for shadows. (default -15)
92+
* `-t` __top-offset__:
93+
The top offset for shadows. (default -15)
94+
* `-I` __fade-in-step__:
95+
Opacity change between steps while fading in. (default 0.028)
96+
* `-O` __fade-out-step__:
97+
Opacity change between steps while fading out. (default 0.03)
98+
* `-D` __fade-delta-time__:
99+
The time between steps in a fade in milliseconds. (default 10)
100+
* `-m` __opacity__:
101+
The opacity for menus. (default 1.0)
102+
* `-c`:
103+
Enabled client-side shadows on windows.
104+
* `-C`:
105+
Avoid drawing shadows on dock/panel windows.
106+
* `-z`:
107+
Zero the part of the shadow's mask behind the window (experimental).
108+
* `-f`:
109+
Fade windows in/out when opening/closing and when opacity
110+
changes, unless --no-fading-openclose is used.
111+
* `-F`:
112+
Equals -f. Deprecated.
113+
* `-i` __opacity__:
114+
Opacity of inactive windows. (0.1 - 1.0)
115+
* `-e` __opacity__:
116+
Opacity of window titlebars and borders. (0.1 - 1.0)
117+
* `-G`:
118+
Don't draw shadows on DND windows
119+
* `-b` __daemonize__:
120+
Daemonize process.
121+
* `-S`:
122+
Enable synchronous operation (for debugging).
123+
* `--config` __path__:
124+
Look for configuration file at the path.
125+
* `--shadow-red` __value__:
126+
Red color value of shadow (0.0 - 1.0, defaults to 0).
127+
* `--shadow-green` __value__:
128+
Green color value of shadow (0.0 - 1.0, defaults to 0).
129+
* `--shadow-blue` __value__:
130+
Blue color value of shadow (0.0 - 1.0, defaults to 0).
131+
* `--inactive-opacity-override`:
132+
Inactive opacity set by -i overrides value of _NET_WM_OPACITY.
133+
* `--inactive-dim` __value__:
134+
Dim inactive windows. (0.0 - 1.0, defaults to 0)
135+
* `--mark-wmwin-focused`:
136+
Try to detect WM windows and mark them as active.
137+
* `--shadow-exclude` __condition__:
138+
Exclude conditions for shadows.
139+
* `--mark-ovredir-focused`:
140+
Mark over-redirect windows as active.
141+
* `--no-fading-openclose`:
142+
Do not fade on window open/close.
143+
* `--shadow-ignore-shaped`:
144+
Do not paint shadows on shaped windows.
145+
* `--detect-rounded-corners`:
146+
Try to detect windows with rounded corners and don't consider
147+
them shaped windows.
148+
149+
### Format of a condition:
150+
151+
`condition = <target>:<type>[<flags>]:<pattern>`
152+
153+
`<target>` is one of `"n"` (window name), `"i"` (window class
154+
instance), and `"g"` (window general class)
155+
156+
`<type>` is one of `"e"` (exact match), `"a"` (match anywhere),
157+
`"s"` (match from start), `"w"` (wildcard), and `"p"` (PCRE
158+
regular expressions, if compiled with the support).
159+
160+
`<flags>` could be a series of flags. Currently the only defined
161+
flag is `"i"` (ignore case).
162+
163+
`<pattern>` is the actual pattern string.
164+
165+
### Configuration
166+
167+
A more robust
168+
[sample configuration file](https://raw.github.com/chjj/compton/master/compton.sample.conf)
169+
is available in the repository.
170+
171+
#### Example
172+
173+
~/compton.conf:
174+
175+
```
176+
# Shadows
177+
shadow = true;
178+
179+
# Opacity
180+
inactive-opacity = 0.8;
181+
frame-opacity = 0.7;
182+
183+
# Fades
184+
fading = true;
69185
```
70186

71-
### Options
72-
73-
compton [-d display] [-r radius] [-o opacity]
74-
[-l left-offset] [-t top-offset]
75-
[-i opacity] [-e opacity] [-cCfFSdG]
76-
77-
* `-d` __display__
78-
Specifies the display to manage.
79-
* `-r` __radius__
80-
Specifies the blur radius for client-side shadows.
81-
* `-o` __opacity__
82-
Specifies the opacity for client-side shadows.
83-
* `-l` __left-offset__
84-
Specifies the left offset for client-side shadows.
85-
* `-t` __top-offset__
86-
Specifies the top offset for client-side shadows.
87-
* `-I` __fade-in-step__
88-
Specifies the opacity change between steps while fading in.
89-
* `-O` __fade-out-step__
90-
Specifies the opacity change between steps while fading out.
91-
* `-D` __fade-delta__
92-
Specifies the time (in milliseconds) between steps in a fade.
93-
* `-c`
94-
Enable client-side shadows on windows.
95-
* `-f`
96-
When -c is specified, enables a smooth fade effect for transient windows like
97-
menus, and for all windows on hide and restore events.
98-
* `-C`
99-
When -c is specified, attempts to avoid painting shadows on panels and docks.
100-
* `-F`
101-
When -f is specified, also enables the fade effect when windows change their
102-
opacity, as with transset(1).
103-
* `-i` __opacity__
104-
Specifies inactive window transparency. (0.1 - 1.0)
105-
* `-e` __opacity__
106-
Specifies window frame transparency. (0.1 - 1.0)
107-
* `-G`
108-
Avoid painting shadows on DND windows.
109-
* `-b` __daemonize__
110-
Attempt to daemonize process.
111-
* `-S`
112-
Enables synchronous operation. Useful for debugging.
187+
Run with:
188+
189+
``` bash
190+
$ compton --config ~/compton.conf
191+
```
113192

114193
## License
115194

116-
xcompmgr has gotten around. As far as I can tell, the lineage for this
117-
particular tree is something like:
195+
Although compton has kind of taken on a life of its own, it was originally
196+
an xcompmgr fork. xcompmgr has gotten around. As far as I can tell, the lineage
197+
for this particular tree is something like:
118198

119199
* Keith Packard (original author)
120200
* Matthew Hawn
121201
* ...
122202
* Dana Jansens
123-
* Myself
203+
* chjj and richardgv
124204

125205
Not counting the tens of people who forked it in between.
126206

0 commit comments

Comments
 (0)