Merge working compton-tde branch

pull/2/head
Timothy Pearson 10 years ago
commit 0f7f449bfc

File diff suppressed because it is too large Load Diff

@ -0,0 +1,350 @@
/*
* Compton - a compositor for X11
*
* Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
*
* Copyright (c) 2011-2013, Christopher Jeffrey
* See LICENSE for more information.
*
*/
#include "common.h"
#include <fnmatch.h>
#include <ctype.h>
// libpcre
#ifdef CONFIG_REGEX_PCRE
#include <pcre.h>
// For compatiblity with <libpcre-8.20
#ifndef PCRE_STUDY_JIT_COMPILE
#define PCRE_STUDY_JIT_COMPILE 0
#define LPCRE_FREE_STUDY(extra) pcre_free(extra)
#else
#define LPCRE_FREE_STUDY(extra) pcre_free_study(extra)
#endif
#endif
#define C2_MAX_LEVELS 10
typedef struct _c2_b c2_b_t;
typedef struct _c2_l c2_l_t;
/// Pointer to a condition tree.
typedef struct {
bool isbranch : 1;
// union {
c2_b_t *b;
c2_l_t *l;
// };
} c2_ptr_t;
/// Initializer for c2_ptr_t.
#define C2_PTR_INIT { \
.isbranch = false, \
.l = NULL, \
}
const static c2_ptr_t C2_PTR_NULL = C2_PTR_INIT;
/// Operator of a branch element.
typedef enum {
C2_B_OUNDEFINED,
C2_B_OAND,
C2_B_OOR,
C2_B_OXOR,
} c2_b_op_t;
/// Structure for branch element in a window condition
struct _c2_b {
bool neg : 1;
c2_b_op_t op;
c2_ptr_t opr1;
c2_ptr_t opr2;
};
/// Initializer for c2_b_t.
#define C2_B_INIT { \
.neg = false, \
.op = C2_B_OUNDEFINED, \
.opr1 = C2_PTR_INIT, \
.opr2 = C2_PTR_INIT, \
}
/// Structure for leaf element in a window condition
struct _c2_l {
bool neg : 1;
enum {
C2_L_OEXISTS,
C2_L_OEQ,
C2_L_OGT,
C2_L_OGTEQ,
C2_L_OLT,
C2_L_OLTEQ,
} op : 3;
enum {
C2_L_MEXACT,
C2_L_MSTART,
C2_L_MCONTAINS,
C2_L_MWILDCARD,
C2_L_MPCRE,
} match : 3;
bool match_ignorecase : 1;
char *tgt;
Atom tgtatom;
bool tgt_onframe;
int index;
enum {
C2_L_PUNDEFINED,
C2_L_PID,
C2_L_PX,
C2_L_PY,
C2_L_PX2,
C2_L_PY2,
C2_L_PWIDTH,
C2_L_PHEIGHT,
C2_L_PWIDTHB,
C2_L_PHEIGHTB,
C2_L_PBDW,
C2_L_PFULLSCREEN,
C2_L_POVREDIR,
C2_L_PARGB,
C2_L_PFOCUSED,
C2_L_PWMWIN,
C2_L_PCLIENT,
C2_L_PWINDOWTYPE,
C2_L_PLEADER,
C2_L_PNAME,
C2_L_PCLASSG,
C2_L_PCLASSI,
C2_L_PROLE,
} predef;
enum c2_l_type {
C2_L_TUNDEFINED,
C2_L_TSTRING,
C2_L_TCARDINAL,
C2_L_TWINDOW,
C2_L_TATOM,
C2_L_TDRAWABLE,
} type;
int format;
enum {
C2_L_PTUNDEFINED,
C2_L_PTSTRING,
C2_L_PTINT,
} ptntype;
char *ptnstr;
long ptnint;
#ifdef CONFIG_REGEX_PCRE
pcre *regex_pcre;
pcre_extra *regex_pcre_extra;
#endif
};
/// Initializer for c2_l_t.
#define C2_L_INIT { \
.neg = false, \
.op = C2_L_OEXISTS, \
.match = C2_L_MEXACT, \
.match_ignorecase = false, \
.tgt = NULL, \
.tgtatom = 0, \
.tgt_onframe = false, \
.predef = C2_L_PUNDEFINED, \
.index = -1, \
.type = C2_L_TUNDEFINED, \
.format = 0, \
.ptntype = C2_L_PTUNDEFINED, \
.ptnstr = NULL, \
.ptnint = 0, \
}
const static c2_l_t leaf_def = C2_L_INIT;
/// Linked list type of conditions.
struct _c2_lptr {
c2_ptr_t ptr;
void *data;
struct _c2_lptr *next;
};
/// Initializer for c2_lptr_t.
#define C2_LPTR_INIT { \
.ptr = C2_PTR_INIT, \
.data = NULL, \
.next = NULL, \
}
/// Structure representing a predefined target.
typedef struct {
const char *name;
enum c2_l_type type;
int format;
} c2_predef_t;
// Predefined targets.
const static c2_predef_t C2_PREDEFS[] = {
[C2_L_PID ] = { "id" , C2_L_TCARDINAL , 0 },
[C2_L_PX ] = { "x" , C2_L_TCARDINAL , 0 },
[C2_L_PY ] = { "y" , C2_L_TCARDINAL , 0 },
[C2_L_PX2 ] = { "x2" , C2_L_TCARDINAL , 0 },
[C2_L_PY2 ] = { "y2" , C2_L_TCARDINAL , 0 },
[C2_L_PWIDTH ] = { "width" , C2_L_TCARDINAL , 0 },
[C2_L_PHEIGHT ] = { "height" , C2_L_TCARDINAL , 0 },
[C2_L_PWIDTHB ] = { "widthb" , C2_L_TCARDINAL , 0 },
[C2_L_PHEIGHTB ] = { "heightb" , C2_L_TCARDINAL , 0 },
[C2_L_PBDW ] = { "border_width" , C2_L_TCARDINAL , 0 },
[C2_L_PFULLSCREEN ] = { "fullscreen" , C2_L_TCARDINAL , 0 },
[C2_L_POVREDIR ] = { "override_redirect" , C2_L_TCARDINAL , 0 },
[C2_L_PARGB ] = { "argb" , C2_L_TCARDINAL , 0 },
[C2_L_PFOCUSED ] = { "focused" , C2_L_TCARDINAL , 0 },
[C2_L_PWMWIN ] = { "wmwin" , C2_L_TCARDINAL , 0 },
[C2_L_PCLIENT ] = { "client" , C2_L_TWINDOW , 0 },
[C2_L_PWINDOWTYPE ] = { "window_type" , C2_L_TSTRING , 0 },
[C2_L_PLEADER ] = { "leader" , C2_L_TWINDOW , 0 },
[C2_L_PNAME ] = { "name" , C2_L_TSTRING , 0 },
[C2_L_PCLASSG ] = { "class_g" , C2_L_TSTRING , 0 },
[C2_L_PCLASSI ] = { "class_i" , C2_L_TSTRING , 0 },
[C2_L_PROLE ] = { "role" , C2_L_TSTRING , 0 },
};
#define mstrncmp(s1, s2) strncmp((s1), (s2), strlen(s1))
/**
* Compare next word in a string with another string.
*/
static inline int
strcmp_wd(const char *needle, const char *src) {
int ret = mstrncmp(needle, src);
if (ret)
return ret;
char c = src[strlen(needle)];
if (isalnum(c) || '_' == c)
return 1;
else
return 0;
}
/**
* Return whether a c2_ptr_t is empty.
*/
static inline bool
c2_ptr_isempty(const c2_ptr_t p) {
return !(p.isbranch ? (bool) p.b: (bool) p.l);
}
/**
* Reset a c2_ptr_t.
*/
static inline void
c2_ptr_reset(c2_ptr_t *pp) {
if (pp)
memcpy(pp, &C2_PTR_NULL, sizeof(c2_ptr_t));
}
/**
* Combine two condition trees.
*/
static inline c2_ptr_t
c2h_comb_tree(c2_b_op_t op, c2_ptr_t p1, c2_ptr_t p2) {
c2_ptr_t p = {
.isbranch = true,
.b = malloc(sizeof(c2_b_t))
};
p.b->opr1 = p1;
p.b->opr2 = p2;
p.b->op = op;
return p;
}
/**
* Get the precedence value of a condition branch operator.
*/
static inline int
c2h_b_opp(c2_b_op_t op) {
switch (op) {
case C2_B_OAND: return 2;
case C2_B_OOR: return 1;
case C2_B_OXOR: return 1;
default: break;
}
assert(0);
return 0;
}
/**
* Compare precedence of two condition branch operators.
*
* Associativity is left-to-right, forever.
*
* @return positive number if op1 > op2, 0 if op1 == op2 in precedence,
* negative number otherwise
*/
static inline int
c2h_b_opcmp(c2_b_op_t op1, c2_b_op_t op2) {
return c2h_b_opp(op1) - c2h_b_opp(op2);
}
static int
c2_parse_grp(session_t *ps, const char *pattern, int offset, c2_ptr_t *presult, int level);
static int
c2_parse_target(session_t *ps, const char *pattern, int offset, c2_ptr_t *presult);
static int
c2_parse_op(const char *pattern, int offset, c2_ptr_t *presult);
static int
c2_parse_pattern(session_t *ps, const char *pattern, int offset, c2_ptr_t *presult);
static int
c2_parse_legacy(session_t *ps, const char *pattern, int offset, c2_ptr_t *presult);
static bool
c2_l_postprocess(session_t *ps, c2_l_t *pleaf);
static void
c2_free(c2_ptr_t p);
/**
* Wrapper of c2_free().
*/
static inline void
c2_freep(c2_ptr_t *pp) {
if (pp) {
c2_free(*pp);
c2_ptr_reset(pp);
}
}
static const char *
c2h_dump_str_tgt(const c2_l_t *pleaf);
static const char *
c2h_dump_str_type(const c2_l_t *pleaf);
static void
c2_dump_raw(c2_ptr_t p);
/**
* Wrapper of c2_dump_raw().
*/
static inline void
c2_dump(c2_ptr_t p) {
c2_dump_raw(p);
printf("\n");
fflush(stdout);
}
static Atom
c2_get_atom_type(const c2_l_t *pleaf);
static bool
c2_match_once(session_t *ps, win *w, const c2_ptr_t cond);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,252 @@
/*
* Compton - a compositor for X11
*
* Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
*
* Copyright (c) 2011-2013, Christopher Jeffrey
* See LICENSE for more information.
*
*/
#include "common.h"
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#define CDBUS_SERVICE_NAME "com.github.chjj.compton"
#define CDBUS_INTERFACE_NAME CDBUS_SERVICE_NAME
#define CDBUS_OBJECT_NAME "/com/github/chjj/compton"
#define CDBUS_ERROR_PREFIX CDBUS_INTERFACE_NAME ".error"
#define CDBUS_ERROR_UNKNOWN CDBUS_ERROR_PREFIX ".unknown"
#define CDBUS_ERROR_UNKNOWN_S "Well, I don't know what happened. Do you?"
#define CDBUS_ERROR_BADMSG CDBUS_ERROR_PREFIX ".bad_message"
#define CDBUS_ERROR_BADMSG_S "Unrecognized command. Beware compton " \
"cannot make you a sandwich."
#define CDBUS_ERROR_BADARG CDBUS_ERROR_PREFIX ".bad_argument"
#define CDBUS_ERROR_BADARG_S "Failed to parse argument %d: %s"
#define CDBUS_ERROR_BADWIN CDBUS_ERROR_PREFIX ".bad_window"
#define CDBUS_ERROR_BADWIN_S "Requested window %#010lx not found."
#define CDBUS_ERROR_BADTGT CDBUS_ERROR_PREFIX ".bad_target"
#define CDBUS_ERROR_BADTGT_S "Target \"%s\" not found."
#define CDBUS_ERROR_FORBIDDEN CDBUS_ERROR_PREFIX ".forbidden"
#define CDBUS_ERROR_FORBIDDEN_S "Incorrect password, access denied."
#define CDBUS_ERROR_CUSTOM CDBUS_ERROR_PREFIX ".custom"
#define CDBUS_ERROR_CUSTOM_S "%s"
// Window type
typedef uint32_t cdbus_window_t;
#define CDBUS_TYPE_WINDOW DBUS_TYPE_UINT32
#define CDBUS_TYPE_WINDOW_STR DBUS_TYPE_UINT32_AS_STRING
typedef uint16_t cdbus_enum_t;
#define CDBUS_TYPE_ENUM DBUS_TYPE_UINT16
#define CDBUS_TYPE_ENUM_STR DBUS_TYPE_UINT16_AS_STRING
static dbus_bool_t
cdbus_callback_add_timeout(DBusTimeout *timeout, void *data);
static void
cdbus_callback_remove_timeout(DBusTimeout *timeout, void *data);
static void
cdbus_callback_timeout_toggled(DBusTimeout *timeout, void *data);
static bool
cdbus_callback_handle_timeout(session_t *ps, timeout_t *ptmout);
/**
* Determine the poll condition of a DBusWatch.
*/
static inline short
cdbus_get_watch_cond(DBusWatch *watch) {
const unsigned flags = dbus_watch_get_flags(watch);
short condition = POLLERR | POLLHUP;
if (flags & DBUS_WATCH_READABLE)
condition |= POLLIN;
if (flags & DBUS_WATCH_WRITABLE)
condition |= POLLOUT;
return condition;
}
static dbus_bool_t
cdbus_callback_add_watch(DBusWatch *watch, void *data);
static void
cdbus_callback_remove_watch(DBusWatch *watch, void *data);
static void
cdbus_callback_watch_toggled(DBusWatch *watch, void *data);
static bool
cdbus_apdarg_bool(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_int32(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_uint32(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_double(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_wid(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_enum(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_string(session_t *ps, DBusMessage *msg, const void *data);
static bool
cdbus_apdarg_wids(session_t *ps, DBusMessage *msg, const void *data);
/** @name DBus signal sending
*/
///@{
static bool
cdbus_signal(session_t *ps, const char *name,
bool (*func)(session_t *ps, DBusMessage *msg, const void *data),
const void *data);
/**
* Send a signal with no argument.
*/
static inline bool
cdbus_signal_noarg(session_t *ps, const char *name) {
return cdbus_signal(ps, name, NULL, NULL);
}
/**
* Send a signal with a Window ID as argument.
*/
static inline bool
cdbus_signal_wid(session_t *ps, const char *name, Window wid) {
return cdbus_signal(ps, name, cdbus_apdarg_wid, &wid);
}
///@}
/** @name DBus reply sending
*/
///@{
static bool
cdbus_reply(session_t *ps, DBusMessage *srcmsg,
bool (*func)(session_t *ps, DBusMessage *msg, const void *data),
const void *data);
static bool
cdbus_reply_errm(session_t *ps, DBusMessage *msg);
#define cdbus_reply_err(ps, srcmsg, err_name, err_format, ...) \
cdbus_reply_errm((ps), dbus_message_new_error_printf((srcmsg), (err_name), (err_format), ## __VA_ARGS__))
/**
* Send a reply with no argument.
*/
static inline bool
cdbus_reply_noarg(session_t *ps, DBusMessage *srcmsg) {
return cdbus_reply(ps, srcmsg, NULL, NULL);
}
/**
* Send a reply with a bool argument.
*/
static inline bool
cdbus_reply_bool(session_t *ps, DBusMessage *srcmsg, bool bval) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_bool, &bval);
}
/**
* Send a reply with an int32 argument.
*/
static inline bool
cdbus_reply_int32(session_t *ps, DBusMessage *srcmsg, int32_t val) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_int32, &val);
}
/**
* Send a reply with an uint32 argument.
*/
static inline bool
cdbus_reply_uint32(session_t *ps, DBusMessage *srcmsg, uint32_t val) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_uint32, &val);
}
/**
* Send a reply with a double argument.
*/
static inline bool
cdbus_reply_double(session_t *ps, DBusMessage *srcmsg, double val) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_double, &val);
}
/**
* Send a reply with a wid argument.
*/
static inline bool
cdbus_reply_wid(session_t *ps, DBusMessage *srcmsg, Window wid) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_wid, &wid);
}
/**
* Send a reply with a string argument.
*/
static inline bool
cdbus_reply_string(session_t *ps, DBusMessage *srcmsg, const char *str) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_string, str);
}
/**
* Send a reply with a enum argument.
*/
static inline bool
cdbus_reply_enum(session_t *ps, DBusMessage *srcmsg, cdbus_enum_t eval) {
return cdbus_reply(ps, srcmsg, cdbus_apdarg_enum, &eval);
}
///@}
static bool
cdbus_msg_get_arg(DBusMessage *msg, int count, const int type, void *pdest);
/**
* Return a string representation of a D-Bus message type.
*/
static inline const char *
cdbus_repr_msgtype(DBusMessage *msg) {
return dbus_message_type_to_string(dbus_message_get_type(msg));
}
/** @name Message processing
*/
///@{
static void
cdbus_process(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_list_win(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_win_get(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_win_set(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_find_win(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_opts_get(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_opts_set(session_t *ps, DBusMessage *msg);
static bool
cdbus_process_introspect(session_t *ps, DBusMessage *msg);
///@}

@ -0,0 +1,897 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.7" />
<title>compton-trans(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Arial,Helvetica,sans-serif;
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
h5 {
font-size: 1.0em;
}
div.sectionbody {
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
ul > li { color: #aaa; }
ul > li > * { color: black; }
pre {
padding: 0;
margin: 0;
}
#author {
color: #527bbd;
font-weight: bold;
font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}
#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
#footer-text {
float: left;
padding-bottom: 0.5em;
}
#footer-badges {
float: right;
padding-bottom: 0.5em;
}
#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid #dddddd;
border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid #dddddd;
border-left: 5px solid #f0f0f0;
background: #f8f8f8;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #888;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > pre.content {
font-family: inherit;
font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
div.colist td {
padding-right: 0.5em;
padding-bottom: 0.3em;
vertical-align: top;
}
div.colist td img {
margin-top: 0.3em;
}
@media print {
#footer-badges { display: none; }
}
#toc {
margin-bottom: 2.5em;
}
#toctitle {
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }
span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }
span.big { font-size: 2em; }
span.small { font-size: 0.6em; }
span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
div.unbreakable { page-break-inside: avoid; }
/*
* xhtml11 specific
*
* */
tt {
font-family: "Courier New", Courier, monospace;
font-size: inherit;
color: navy;
}
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-weight: bold;
color: #527bbd;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
/*
* html5 specific
*
* */
.monospaced {
font-family: "Courier New", Courier, monospace;
font-size: inherit;
color: navy;
}
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
thead, p.tableblock.header {
font-weight: bold;
color: #527bbd;
}
p.tableblock {
margin-top: 0;
}
table.tableblock {
border-width: 3px;
border-spacing: 0px;
border-style: solid;
border-color: #527bbd;
border-collapse: collapse;
}
th.tableblock, td.tableblock {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: #527bbd;
}
table.tableblock.frame-topbot {
border-left-style: hidden;
border-right-style: hidden;
}
table.tableblock.frame-sides {
border-top-style: hidden;
border-bottom-style: hidden;
}
table.tableblock.frame-none {
border-style: hidden;
}
th.tableblock.halign-left, td.tableblock.halign-left {
text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
th.tableblock.valign-top, td.tableblock.valign-top {
vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
body.manpage h2 {
border-style: none;
}
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = { // Namespace.
/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////
/* Author: Mihai Bazon, September 2002
* http://students.infoiasi.ro/~mishoo
*
* Table Of Content generator
* Version: 0.4
*
* Feel free to use this script under the terms of the GNU General Public
* License, as long as you do not remove or alter this notice.
*/
/* modified by Troy D. Hanson, September 2006. License: GPL */
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
// toclevels = 1..4.
toc: function (toclevels) {
function getText(el) {
var text = "";
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
text += i.data;
else if (i.firstChild != null)
text += getText(i);
}
return text;
}
function TocEntry(el, text, toclevel) {
this.element = el;
this.text = text;
this.toclevel = toclevel;
}
function tocEntries(el, toclevels) {
var result = new Array;
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
if (!toc) {
return;
}
// Delete existing TOC entries in case we're reloading the TOC.
var tocEntriesToRemove = [];
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
}
for (i = 0; i < tocEntriesToRemove.length; i++) {
toc.removeChild(tocEntriesToRemove[i]);
}
// Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
// Delete existing footnote entries in case we're reloading the footnodes.
var i;
var noteholder = document.getElementById("footnotes");
if (!noteholder) {
return;
}
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
noteholder.removeChild(entriesToRemove[i]);
}
// Rebuild footnote entries.
var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
var note = spans[i].getAttribute("data-note");
if (!note) {
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
spans[i].setAttribute("data-note", note);
}
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
},
install: function(toclevels) {
var timerId;
function reinstall() {
asciidoc.footnotes();
if (toclevels) {
asciidoc.toc(toclevels);
}
}
function reinstallAndRemoveTimer() {
clearInterval(timerId);
reinstall();
}
timerId = setInterval(reinstall, 500);
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
else
window.onload = reinstallAndRemoveTimer;
}
}
asciidoc.install();
/*]]>*/
</script>
</head>
<body class="manpage">
<div id="header">
<h1>
compton-trans(1) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>compton-trans -
an opacity setter tool
</p>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph"><p><strong>compton-trans</strong> [-w <em>WINDOW_ID</em>] [-n <em>WINDOW_NAME</em>] [-c] [-s] <em>OPACITY</em></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p><strong>compton-trans</strong> is a bash script that sets <em>_NET_WM_WINDOW_OPACITY</em> attribute of a window using standard X11 command-line utilities, including <strong>xprop</strong>(1) and <strong>xwininfo</strong>(1). It is similar to <strong>transset</strong>(1) or <strong>transset-df</strong>(1).</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-w</strong> <em>WINDOW_ID</em>
</dt>
<dd>
<p>
Specify the window id of the target window.
</p>
</dd>
<dt class="hdlist1">
<strong>-n</strong> <em>WINDOW_NAME</em>
</dt>
<dd>
<p>
Specify and try to match a window name.
</p>
</dd>
<dt class="hdlist1">
<strong>-c</strong>
</dt>
<dd>
<p>
Specify the currently active window as target. Only works if EWMH <em>_NET_ACTIVE_WINDOW</em> property exists on root window.
</p>
</dd>
<dt class="hdlist1">
<strong>-s</strong>
</dt>
<dd>
<p>
Select target window with mouse cursor. This is the default if no window has been specified.
</p>
</dd>
<dt class="hdlist1">
<strong>-o</strong> <em>OPACITY</em>
</dt>
<dd>
<p>
Specify the new opacity value for the window. This value can be anywhere from 1-100. If it is prefixed with a plus or minus (+/-), this will increment or decrement from the target window&#8217;s current opacity instead.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Set the opacity of the window with specific window ID to 75%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -w "$WINDOWID" 75</tt></pre>
</div></div>
</li>
<li>
<p>
Set the opacity of the window with the name "urxvt" to 75%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -n "urxvt" 75</tt></pre>
</div></div>
</li>
<li>
<p>
Set current window to opacity of 75%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -c 75</tt></pre>
</div></div>
</li>
<li>
<p>
Select target window and set opacity to 75%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -s 75</tt></pre>
</div></div>
</li>
<li>
<p>
Increment opacity of current active window by 5%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -c +5</tt></pre>
</div></div>
</li>
<li>
<p>
Decrement opacity of current active window by 5%:
</p>
<div class="listingblock">
<div class="content">
<pre><tt>compton-trans -c -- -5</tt></pre>
</div></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_bugs">BUGS</h2>
<div class="sectionbody">
<div class="paragraph"><p>Please report any bugs you find to <a href="https://github.com/chjj/compton">https://github.com/chjj/compton</a> .</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_authors">AUTHORS</h2>
<div class="sectionbody">
<div class="paragraph"><p>Christopher Jeffrey (<a href="https://github.com/chjj">https://github.com/chjj</a>).</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="compton.1.html"><strong>compton</strong>(1)</a>, <strong>xprop</strong>(1), <strong>xwininfo</strong>(1)</p></div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2014-03-30 20:46:04 CDT
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,201 @@
'\" t
.\" Title: compton-trans
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 03/31/2014
.\" Manual: LOCAL USER COMMANDS
.\" Source: compton nightly-20121114
.\" Language: English
.\"
.TH "COMPTON\-TRANS" "1" "03/31/2014" "compton nightly\-20121114" "LOCAL USER COMMANDS"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
compton-trans \- an opacity setter tool
.SH "SYNOPSIS"
.sp
\fBcompton\-trans\fR [\-w \fIWINDOW_ID\fR] [\-n \fIWINDOW_NAME\fR] [\-c] [\-s] \fIOPACITY\fR
.SH "DESCRIPTION"
.sp
\fBcompton\-trans\fR is a bash script that sets \fI_NET_WM_WINDOW_OPACITY\fR attribute of a window using standard X11 command\-line utilities, including \fBxprop\fR(1) and \fBxwininfo\fR(1)\&. It is similar to \fBtransset\fR(1) or \fBtransset\-df\fR(1)\&.
.SH "OPTIONS"
.PP
\fB\-w\fR \fIWINDOW_ID\fR
.RS 4
Specify the window id of the target window\&.
.RE
.PP
\fB\-n\fR \fIWINDOW_NAME\fR
.RS 4
Specify and try to match a window name\&.
.RE
.PP
\fB\-c\fR
.RS 4
Specify the currently active window as target\&. Only works if EWMH
\fI_NET_ACTIVE_WINDOW\fR
property exists on root window\&.
.RE
.PP
\fB\-s\fR
.RS 4
Select target window with mouse cursor\&. This is the default if no window has been specified\&.
.RE
.PP
\fB\-o\fR \fIOPACITY\fR
.RS 4
Specify the new opacity value for the window\&. This value can be anywhere from 1\-100\&. If it is prefixed with a plus or minus (+/\-), this will increment or decrement from the target window\(cqs current opacity instead\&.
.RE
.SH "EXAMPLES"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Set the opacity of the window with specific window ID to 75%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-w "$WINDOWID" 75
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Set the opacity of the window with the name "urxvt" to 75%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-n "urxvt" 75
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Set current window to opacity of 75%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-c 75
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Select target window and set opacity to 75%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-s 75
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Increment opacity of current active window by 5%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-c +5
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Decrement opacity of current active window by 5%:
.sp
.if n \{\
.RS 4
.\}
.nf
compton\-trans \-c \-\- \-5
.fi
.if n \{\
.RE
.\}
.RE
.SH "BUGS"
.sp
Please report any bugs you find to https://github\&.com/chjj/compton \&.
.SH "AUTHORS"
.sp
Christopher Jeffrey (https://github\&.com/chjj)\&.
.SH "SEE ALSO"
.sp
\fBcompton\fR(1), \fBxprop\fR(1), \fBxwininfo\fR(1)

@ -0,0 +1,904 @@
'\" t
.\" Title: compton
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 03/31/2014
.\" Manual: LOCAL USER COMMANDS
.\" Source: compton nightly-20130421
.\" Language: English
.\"
.TH "COMPTON" "1" "03/31/2014" "compton nightly\-20130421" "LOCAL USER COMMANDS"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
compton \- a compositor for X11
.SH "SYNOPSIS"
.sp
\fBcompton\fR [\fIOPTIONS\fR]
.SH "WARNING"
.sp
This man page may be less up\-to\-date than the usage text in compton (compton \-h)\&.
.SH "DESCRIPTION"
.sp
compton is a compositor based on Dana Jansens\*(Aq version of xcompmgr (which itself was written by Keith Packard)\&. It includes some improvements over the original xcompmgr, like window frame opacity and inactive window transparency\&.
.SH "OPTIONS"
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Get the usage text embedded in program code, which may be more up\-to\-date than this man page\&.
.RE
.PP
\fB\-d\fR \fIDISPLAY\fR
.RS 4
Display to be managed\&.
.RE
.PP
\fB\-r\fR \fIRADIUS\fR
.RS 4
The blur radius for shadows, in pixels\&. (defaults to 12)
.RE
.PP
\fB\-o\fR \fIOPACITY\fR
.RS 4
The opacity of shadows\&. (0\&.0 \- 1\&.0, defaults to 0\&.75)
.RE
.PP
\fB\-l\fR \fIOFFSET\fR
.RS 4
The left offset for shadows, in pixels\&. (defaults to \-15)
.RE
.PP
\fB\-t\fR \fIOFFSET\fR
.RS 4
The top offset for shadows, in pixels\&. (defaults to \-15)
.RE
.PP
\fB\-I\fR \fIOPACITY_STEP\fR
.RS 4
Opacity change between steps while fading in\&. (0\&.01 \- 1\&.0, defaults to 0\&.028)
.RE
.PP
\fB\-O\fR \fIOPACITY_STEP\fR
.RS 4
Opacity change between steps while fading out\&. (0\&.01 \- 1\&.0, defaults to 0\&.03)
.RE
.PP
\fB\-D\fR \fIMILLISECONDS\fR
.RS 4
The time between steps in fade step, in milliseconds\&. (> 0, defaults to 10)
.RE
.PP
\fB\-m\fR \fIOPACITY\fR
.RS 4
Default opacity for dropdown menus and popup menus\&. (0\&.0 \- 1\&.0, defaults to 1\&.0)
.RE
.PP
\fB\-c\fR
.RS 4
Enabled client\-side shadows on windows\&. Note desktop windows (windows with
\fI_NET_WM_WINDOW_TYPE_DESKTOP\fR) never get shadow\&.
.RE
.PP
\fB\-C\fR
.RS 4
Avoid drawing shadows on dock/panel windows\&.
.RE
.PP
\fB\-z\fR
.RS 4
Zero the part of the shadow\(cqs mask behind the window\&. Note this may not work properly on ARGB windows with fully transparent areas\&.
.RE
.PP
\fB\-f\fR
.RS 4
Fade windows in/out when opening/closing and when opacity changes, unless
\fB\-\-no\-fading\-openclose\fR
is used\&.
.RE
.PP
\fB\-F\fR
.RS 4
Equals
\fB\-f\fR\&. Deprecated\&.
.RE
.PP
\fB\-i\fR \fIOPACITY\fR
.RS 4
Opacity of inactive windows\&. (0\&.1 \- 1\&.0, disabled by default)
.RE
.PP
\fB\-e\fR \fIOPACITY\fR
.RS 4
Opacity of window titlebars and borders\&. (0\&.1 \- 1\&.0, disabled by default)
.RE
.PP
\fB\-G\fR
.RS 4
Don\(cqt draw shadows on drag\-and\-drop windows\&.
.RE
.PP
\fB\-b\fR
.RS 4
Daemonize process\&. Fork to background after initialization\&.
.RE
.PP
\fB\-S\fR
.RS 4
Enable synchronous X operation (for debugging)\&.
.RE
.PP
\fB\-\-config\fR \fIPATH\fR
.RS 4
Look for configuration file at the path\&. See
\fBCONFIGURATION FILES\fR
section below for where compton looks for a configuration file by default\&.
.RE
.PP
\fB\-\-write\-pid\-path\fR \fIPATH\fR
.RS 4
Write process ID to a file\&.
.RE
.PP
\fB\-\-shadow\-red\fR \fIVALUE\fR
.RS 4
Red color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&.
.RE
.PP
\fB\-\-shadow\-green\fR \fIVALUE\fR
.RS 4
Green color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&.
.RE
.PP
\fB\-\-shadow\-blue\fR \fIVALUE\fR
.RS 4
Blue color value of shadow (0\&.0 \- 1\&.0, defaults to 0)\&.
.RE
.PP
\fB\-\-inactive\-opacity\-override\fR
.RS 4
Let inactive opacity set by
\fB\-i\fR
overrides the windows\*(Aq
\fI_NET_WM_OPACITY\fR
values\&.
.RE
.PP
\fB\-\-active\-opacity\fR \fIOPACITY\fR
.RS 4
Default opacity for active windows\&. (0\&.0 \- 1\&.0)
.RE
.PP
\fB\-\-inactive\-dim\fR \fIVALUE\fR
.RS 4
Dim inactive windows\&. (0\&.0 \- 1\&.0, defaults to 0\&.0)
.RE
.PP
\fB\-\-mark\-wmwin\-focused\fR
.RS 4
Try to detect WM windows (a non\-override\-redirect window with no child that has
WM_STATE) and mark them as active\&.
.RE
.PP
\fB\-\-mark\-ovredir\-focused\fR
.RS 4
Mark override\-redirect windows that doesn\(cqt have a child window with
WM_STATE
focused\&.
.RE
.PP
\fB\-\-no\-fading\-openclose\fR
.RS 4
Do not fade on window open/close\&.
.RE
.PP
\fB\-\-shadow\-ignore\-shaped\fR
.RS 4
Do not paint shadows on shaped windows\&. Note shaped windows here means windows setting its shape through X Shape extension\&. Those using ARGB background is beyond our control\&.
.RE
.PP
\fB\-\-detect\-rounded\-corners\fR
.RS 4
Try to detect windows with rounded corners and don\(cqt consider them shaped windows\&. The accuracy is not very high, unfortunately\&.
.RE
.PP
\fB\-\-detect\-client\-opacity\fR
.RS 4
Detect
\fI_NET_WM_OPACITY\fR
on client windows, useful for window managers not passing
\fI_NET_WM_OPACITY\fR
of client windows to frame windows\&.
.RE
.PP
\fB\-\-refresh\-rate\fR \fIREFRESH_RATE\fR
.RS 4
Specify refresh rate of the screen\&. If not specified or 0, compton will try detecting this with X RandR extension\&.
.RE
.PP
\fB\-\-vsync\fR \fIVSYNC_METHOD\fR
.RS 4
Set VSync method\&. VSync methods currently available:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fInone\fR: No VSync
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIdrm\fR: VSync with
\fIDRM_IOCTL_WAIT_VBLANK\fR\&. May only work on some drivers\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIopengl\fR: Try to VSync with
\fISGI_video_sync\fR
OpenGL extension\&. Only work on some drivers\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIopengl\-oml\fR: Try to VSync with
\fIOML_sync_control\fR
OpenGL extension\&. Only work on some drivers\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIopengl\-swc\fR: Try to VSync with
\fISGI_swap_control\fR
OpenGL extension\&. Only work on some drivers\&. Works only with GLX backend\&. Known to be most effective on many drivers\&. Does not actually control paint timing, only buffer swap is affected, so it doesn\(cqt have the effect of
\fB\-\-sw\-opti\fR
unlike other methods\&. Experimental\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIopengl\-mswc\fR: Try to VSync with
\fIMESA_swap_control\fR
OpenGL extension\&. Basically the same as
\fIopengl\-swc\fR
above, except the extension we use\&.
.RE
.sp
(Note some VSync methods may not be enabled at compile time\&.)
.RE
.PP
\fB\-\-vsync\-aggressive\fR
.RS 4
Attempt to send painting request before VBlank and do XFlush() during VBlank\&. Reported to work pretty terribly\&. This switch may be lifted out at any moment\&.
.RE
.PP
\fB\-\-alpha\-step\fR \fIVALUE\fR
.RS 4
X Render backend: Step for pregenerating alpha pictures\&. (0\&.01 \- 1\&.0, defaults to 0\&.03)
.RE
.PP
\fB\-\-dbe\fR
.RS 4
Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing\&. Reported to have no effect, though\&.
.RE
.PP
\fB\-\-paint\-on\-overlay\fR
.RS 4
Painting on X Composite overlay window instead of on root window\&.
.RE
.PP
\fB\-\-sw\-opti\fR
.RS 4
Limit compton to repaint at most once every 1 /
\fIrefresh_rate\fR
second to boost performance\&. This should not be used with
\fB\-\-vsync\fR
drm/opengl/opengl\-oml as they essentially does
\fB\-\-sw\-opti\fR\*(Aqs job already, unless you wish to specify a lower refresh rate than the actual value\&.
.RE
.PP
\fB\-\-use\-ewmh\-active\-win\fR
.RS 4
Use EWMH
\fI_NET_ACTIVE_WINDOW\fR
to determine currently focused window, rather than listening to
\fIFocusIn\fR/\fIFocusOut\fR
event\&. Might have more accuracy, provided that the WM supports it\&.
.RE
.PP
\fB\-\-respect\-prop\-shadow\fR
.RS 4
Respect
\fI_COMPTON_SHADOW\fR\&. This a prototype\-level feature, which you must not rely on\&.
.RE
.PP
\fB\-\-unredir\-if\-possible\fR
.RS 4
Unredirect all windows if a full\-screen opaque window is detected, to maximize performance for full\-screen windows\&. Known to cause flickering when redirecting/unredirecting windows\&.
\fB\-\-paint\-on\-overlay\fR
may make the flickering less obvious\&.
.RE
.PP
\fB\-\-unredir\-if\-possible\-delay\fR \fIMILLISECONDS\fR
.RS 4
Delay before unredirecting the window, in milliseconds\&. Defaults to 0\&.
.RE
.PP
\fB\-\-unredir\-if\-possible\-exclude\fR \fICONDITION\fR
.RS 4
Conditions of windows that shouldn\(cqt be considered full\-screen for unredirecting screen\&.
.RE
.PP
\fB\-\-shadow\-exclude\fR \fICONDITION\fR
.RS 4
Specify a list of conditions of windows that should have no shadow\&.
.RE
.PP
\fB\-\-fade\-exclude\fR \fICONDITION\fR
.RS 4
Specify a list of conditions of windows that should not be faded\&.
.RE
.PP
\fB\-\-focus\-exclude\fR \fICONDITION\fR
.RS 4
Specify a list of conditions of windows that should always be considered focused\&.
.RE
.PP
\fB\-\-inactive\-dim\-fixed\fR
.RS 4
Use fixed inactive dim value, instead of adjusting according to window opacity\&.
.RE
.PP
\fB\-\-detect\-transient\fR
.RS 4
Use
\fIWM_TRANSIENT_FOR\fR
to group windows, and consider windows in the same group focused at the same time\&.
.RE
.PP
\fB\-\-detect\-client\-leader\fR
.RS 4
Use
\fIWM_CLIENT_LEADER\fR
to group windows, and consider windows in the same group focused at the same time\&.
\fIWM_TRANSIENT_FOR\fR
has higher priority if
\fB\-\-detect\-transient\fR
is enabled, too\&.
.RE
.PP
\fB\-\-blur\-background\fR
.RS 4
Blur background of semi\-transparent / ARGB windows\&. Bad in performance, with driver\-dependent behavior\&. The name of the switch may change without prior notifications\&.
.RE
.PP
\fB\-\-blur\-background\-frame\fR
.RS 4
Blur background of windows when the window frame is not opaque\&. Implies
\fB\-\-blur\-background\fR\&. Bad in performance, with driver\-dependent behavior\&. The name may change\&.
.RE
.PP
\fB\-\-blur\-background\-fixed\fR
.RS 4
Use fixed blur strength rather than adjusting according to window opacity\&.
.RE
.PP
\fB\-\-blur\-kern\fR \fIMATRIX\fR
.RS 4
Specify the blur convolution kernel, with the following format:
.sp
.if n \{\
.RS 4
.\}
.nf
WIDTH,HEIGHT,ELE1,ELE2,ELE3,ELE4,ELE5\&.\&.\&.
.fi
.if n \{\
.RE
.\}
.sp
The element in the center must not be included, it will be forever 1\&.0 or changing based on opacity, depending on whether you have
\-\-blur\-background\-fixed\&. Yet the automatic adjustment of blur factor may not work well with a custom blur kernel\&.
.sp
A 7x7 Guassian blur kernel (sigma = 0\&.84089642) looks like:
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-blur\-kern \*(Aq7,7,0\&.000003,0\&.000102,0\&.000849,0\&.001723,0\&.000849,0\&.000102,0\&.000003,0\&.000102,0\&.003494,0\&.029143,0\&.059106,0\&.029143,0\&.003494,0\&.000102,0\&.000849,0\&.029143,0\&.243117,0\&.493069,0\&.243117,0\&.029143,0\&.000849,0\&.001723,0\&.059106,0\&.493069,0\&.493069,0\&.059106,0\&.001723,0\&.000849,0\&.029143,0\&.243117,0\&.493069,0\&.243117,0\&.029143,0\&.000849,0\&.000102,0\&.003494,0\&.029143,0\&.059106,0\&.029143,0\&.003494,0\&.000102,0\&.000003,0\&.000102,0\&.000849,0\&.001723,0\&.000849,0\&.000102,0\&.000003\*(Aq
.fi
.if n \{\
.RE
.\}
.sp
May also be one of the predefined kernels:
3x3box
(default),
5x5box,
7x7box,
3x3gaussian,
5x5gaussian,
7x7gaussian,
9x9gaussian,
11x11gaussian\&. All Guassian kernels are generated with sigma = 0\&.84089642 \&. You may use the accompanied
compton\-convgen\&.py
to generate blur kernels\&.
.RE
.PP
\fB\-\-blur\-background\-exclude\fR \fICONDITION\fR
.RS 4
Exclude conditions for background blur\&.
.RE
.PP
\fB\-\-resize\-damage\fR \fIINTEGER\fR
.RS 4
Resize damaged region by a specific number of pixels\&. A positive value enlarges it while a negative one shrinks it\&. If the value is positive, those additional pixels will not be actually painted to screen, only used in blur calculation, and such\&. (Due to technical limitations, with
\fB\-\-dbe\fR
or
\fB\-\-glx\-swap\-method\fR, those pixels will still be incorrectly painted to screen\&.) Primarily used to fix the line corruption issues of blur, in which case you should use the blur radius value here (e\&.g\&. with a 3x3 kernel, you should use
\fB\-\-resize\-damage\fR
1, with a 5x5 one you use
\fB\-\-resize\-damage\fR
2, and so on)\&. May or may not work with
\-\-glx\-no\-stencil\&. Shrinking doesn\(cqt function correctly\&.
.RE
.PP
\fB\-\-invert\-color\-include\fR \fICONDITION\fR
.RS 4
Specify a list of conditions of windows that should be painted with inverted color\&. Resource\-hogging, and is not well tested\&.
.RE
.PP
\fB\-\-opacity\-rule\fR \fIOPACITY\fR:\*(AqCONDITION\*(Aq
.RS 4
Specify a list of opacity rules, in the format
PERCENT:PATTERN, like
50:name *= "Firefox"\&. compton\-trans is recommended over this\&. Note we do not distinguish 100% and unset, and we don\(cqt make any guarantee about possible conflicts with other programs that set
\fI_NET_WM_WINDOW_OPACITY\fR
on frame or client windows\&.
.RE
.PP
\fB\-\-shadow\-exclude\-reg\fR \fIGEOMETRY\fR
.RS 4
Specify a X geometry that describes the region in which shadow should not be painted in, such as a dock window region\&. Use
\-\-shadow\-exclude\-reg x10+0\-0, for example, if the 10 pixels on the bottom of the screen should not have shadows painted on\&.
.RE
.PP
\fB\-\-xinerama\-shadow\-crop\fR
.RS 4
Crop shadow of a window fully on a particular Xinerama screen to the screen\&.
.RE
.PP
\fB\-\-backend\fR \fIBACKEND\fR
.RS 4
Specify the backend to use:
xrender
or
glx\&. GLX (OpenGL) backend generally has much superior performance as far as you have a graphic card/chip and driver\&.
.RE
.PP
\fB\-\-glx\-no\-stencil\fR
.RS 4
GLX backend: Avoid using stencil buffer, useful if you don\(cqt have a stencil buffer\&. Might cause incorrect opacity when rendering transparent content (but never practically happened) and may not work with
\fB\-\-blur\-background\fR\&. My tests show a 15% performance boost\&. Recommended\&.
.RE
.PP
\fB\-\-glx\-copy\-from\-front\fR
.RS 4
GLX backend: Copy unmodified regions from front buffer instead of redrawing them all\&. My tests with nvidia\-drivers show a 10% decrease in performance when the whole screen is modified, but a 20% increase when only 1/4 is\&. My tests on nouveau show terrible slowdown\&. Useful with
\-\-glx\-swap\-method, as well\&.
.RE
.PP
\fB\-\-glx\-use\-copysubbuffermesa\fR
.RS 4
GLX backend: Use
\fIMESA_copy_sub_buffer\fR
to do partial screen update\&. My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated\&. May break VSync and is not available on some drivers\&. Overrides
\fB\-\-glx\-copy\-from\-front\fR\&.
.RE
.PP
\fB\-\-glx\-no\-rebind\-pixmap\fR
.RS 4
GLX backend: Avoid rebinding pixmap on window damage\&. Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe)\&. Recommended if it works\&.
.RE
.PP
\fB\-\-glx\-swap\-method\fR undefined/exchange/copy/3/4/5/6/buffer\-age
.RS 4
GLX backend: GLX buffer swap method we assume\&. Could be
undefined
(0),
copy
(1),
exchange
(2), 3\-6, or
buffer\-age
(\-1)\&.
undefined
is the slowest and the safest, and the default value\&.
copy
is fastest, but may fail on some drivers, 2\-6 are gradually slower but safer (6 is still faster than 0)\&. Usually, double buffer means 2, triple buffer means 3\&.
buffer\-age
means auto\-detect using
\fIGLX_EXT_buffer_age\fR, supported by some drivers\&. Useless with
\fB\-\-glx\-use\-copysubbuffermesa\fR\&. Partially breaks
\-\-resize\-damage\&. Defaults to
undefined\&.
.RE
.PP
\fB\-\-glx\-use\-gpushader4\fR
.RS 4
GLX backend: Use
\fIGL_EXT_gpu_shader4\fR
for some optimization on blur GLSL code\&. My tests on GTX 670 show no noticeable effect\&.
.RE
.PP
\fB\-\-dbus\fR
.RS 4
Enable remote control via D\-Bus\&. See the
\fBD\-BUS API\fR
section below for more details\&.
.RE
.PP
\fB\-\-benchmark\fR \fICYCLES\fR
.RS 4
Benchmark mode\&. Repeatedly paint until reaching the specified cycles\&.
.RE
.PP
\fB\-\-benchmark\-wid\fR \fIWINDOW_ID\fR
.RS 4
Specify window ID to repaint in benchmark mode\&. If omitted or is 0, the whole screen is repainted\&.
.RE
.SH "FORMAT OF CONDITIONS"
.sp
Some options accept a condition string to match certain windows\&. A condition string is formed by one or more conditions, joined by logical operators\&.
.sp
A condition with "exists" operator looks like this:
.sp
.if n \{\
.RS 4
.\}
.nf
<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE>
.fi
.if n \{\
.RE
.\}
.sp
With equals operator it looks like:
.sp
.if n \{\
.RS 4
.\}
.nf
<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OP QUALIFIER> <MATCH TYPE> = <PATTERN>
.fi
.if n \{\
.RE
.\}
.sp
With greater\-than/less\-than operators it looks like:
.sp
.if n \{\
.RS 4
.\}
.nf
<NEGATION> <TARGET> <CLIENT/FRAME> [<INDEX>] : <FORMAT> <TYPE> <NEGATION> <OPERATOR> <PATTERN>
.fi
.if n \{\
.RE
.\}
.sp
\fINEGATION\fR (optional) is one or more exclamation marks;
.sp
\fITARGET\fR is either a predefined target name, or the name of a window property to match\&. Supported predefined targets are id, x, y, x2 (x + widthb), y2, width, height, widthb (width + 2 * border), heightb, override_redirect, argb (whether the window has an ARGB visual), focused, wmwin (whether the window looks like a WM window, i\&.e\&. has no child window with WM_STATE and is not override\-redirected), client (ID of client window), window_type (window type in string), leader (ID of window leader), name, class_g (= WM_CLASS[1]), class_i (= WM_CLASS[0]), and role\&.
.sp
\fICLIENT/FRAME\fR is a single @ if the window attribute should be be looked up on client window, nothing if on frame window;
.sp
\fIINDEX\fR (optional) is the index number of the property to look up\&. For example, [2] means look at the third value in the property\&. Do not specify it for predefined targets\&.
.sp
\fIFORMAT\fR (optional) specifies the format of the property, 8, 16, or 32\&. On absence we use format X reports\&. Do not specify it for predefined or string targets\&.
.sp
\fITYPE\fR is a single character representing the type of the property to match for: c for \fICARDINAL\fR, a for \fIATOM\fR, w for \fIWINDOW\fR, d for \fIDRAWABLE\fR, s for \fISTRING\fR (and any other string types, such as \fIUTF8_STRING\fR)\&. Do not specify it for predefined targets\&.
.sp
\fIOP QUALIFIER\fR (optional), applicable only for equals operator, could be ? (ignore\-case)\&.
.sp
\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE regular expression)\&.
.sp
\fIOPERATOR\fR is one of = (equals), <, >, <=, =>, or nothing (exists)\&. Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then)\&.
.sp
\fIPATTERN\fR is either an integer or a string enclosed by single or double quotes\&. Python\-3\-style escape sequences and raw string are supported in the string format\&.
.sp
Supported logical operators are && (and) and || (or)\&. && has higher precedence than ||, left\-to\-right associativity\&. Use parentheses to change precedence\&.
.sp
Examples:
.sp
.if n \{\
.RS 4
.\}
.nf
# If the window is focused
focused
focused = 1
# If the window is not override\-redirected
!override_redirect
override_redirect = false
override_redirect != true
override_redirect != 1
# If the window is a menu
window_type *= "menu"
_NET_WM_WINDOW_TYPE@:a *= "MENU"
# If the window name contains "Firefox", ignore case
name *?= "Firefox"
_NET_WM_NAME@:s *?= "Firefox"
# If the window name ends with "Firefox"
name %= "*Firefox"
name ~= "Firefox$"
# If the window has a property _COMPTON_SHADOW with value 0, type CARDINAL,
# format 32, value 0, on its frame window
_COMPTON_SHADOW:32c = 0
# If the third value of _NET_FRAME_EXTENTS is less than 20, or there\*(Aqs no
# _NET_FRAME_EXTENTS property on client window
_NET_FRAME_EXTENTS@[2]:32c < 20 || !_NET_FRAME_EXTENTS@:32c
# The pattern here will be parsed as "dd4"
name = "\ex64\ex64\eo64"
# The pattern here will be parsed as "\ex64\ex64\ex64"
name = r"\ex64\ex64\eo64"
.fi
.if n \{\
.RE
.\}
.SH "LEGACY FORMAT OF CONDITIONS"
.sp
This is the old condition format we once used\&. Support of this format might be removed in the future\&.
.sp
.if n \{\
.RS 4
.\}
.nf
condition = TARGET:TYPE[FLAGS]:PATTERN
.fi
.if n \{\
.RE
.\}
.sp
\fITARGET\fR is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role)\&.
.sp
\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support)\&.
.sp
\fIFLAGS\fR could be a series of flags\&. Currently the only defined flag is "i" (ignore case)\&.
.sp
\fIPATTERN\fR is the actual pattern string\&.
.SH "CONFIGURATION FILES"
.sp
compton could read from a configuration file if libconfig support is compiled in\&. If \fB\-\-config\fR is not used, compton will seek for a configuration file in $XDG_CONFIG_HOME/compton\&.conf (~/\&.config/compton\&.conf, usually), then ~/\&.compton\&.conf, then compton\&.conf under $XDG_DATA_DIRS (often /etc/xdg/compton\&.conf)\&.
.sp
compton uses general libconfig configuration file format\&. A sample configuration file is available as compton\&.sample\&.conf in the source tree\&. Most commandline switches each could be replaced with an option in configuration file, thus documented above\&. Window\-type\-specific settings are exposed only in configuration file and has the following format:
.sp
.if n \{\
.RS 4
.\}
.nf
wintypes:
{
WINDOW_TYPE = { fade = BOOL; shadow = BOOL; opacity = FLOAT; focus = BOOL; };
};
.fi
.if n \{\
.RE
.\}
.sp
\fIWINDOW_TYPE\fR is one of the 15 window types defined in EWMH standard: "unknown", "desktop", "dock", "toolbar", "menu", "utility", "splash", "dialog", "normal", "dropdown_menu", "popup_menu", "tooltip", "notify", "combo", and "dnd"\&. "fade" and "shadow" controls window\-type\-specific shadow and fade settings\&. "opacity" controls default opacity of the window type\&. "focus" controls whether the window of this type is to be always considered focused\&. (By default, all window types except "normal" and "dialog" has this on\&.)
.SH "SIGNALS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
compton reinitializes itself upon receiving
SIGUSR1\&.
.RE
.SH "D-BUS API"
.sp
It\(cqs possible to control compton via D\-Bus messages, by running compton with \fB\-\-dbus\fR and send messages to com\&.github\&.chjj\&.compton\&.<DISPLAY>\&. <DISPLAY> is the display used by compton, with all non\-alphanumeric characters transformed to underscores\&. For DISPLAY=:0\&.0 you should use com\&.github\&.chjj\&.compton\&._0_0, for example\&.
.sp
The D\-Bus methods and signals are not yet stable, thus undocumented right now\&.
.SH "EXAMPLES"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Disable configuration file parsing:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-\-config /dev/null
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Run compton with client\-side shadow and fading, disable shadow on dock windows and drag\-and\-drop windows:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-cCGf
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Same thing as above, plus making inactive windows 80% transparent, making frame 80% transparent, don\(cqt fade on window open/close, enable software optimization, and fork to background:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-bcCGf \-i 0\&.8 \-e 0\&.8 \-\-no\-fading\-openclose \-\-sw\-opti
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Draw white shadows:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-c \-\-shadow\-red 1 \-\-shadow\-green 1 \-\-shadow\-blue 1
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Avoid drawing shadows on wbar window:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-c \-\-shadow\-exclude \*(Aqclass_g = "wbar"\*(Aq
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Enable OpenGL SGI_swap_control VSync with GLX backend:
.sp
.if n \{\
.RS 4
.\}
.nf
$ compton \-\-backend glx \-\-vsync opengl\-swc
.fi
.if n \{\
.RE
.\}
.RE
.SH "BUGS"
.sp
Please report any you find to https://github\&.com/chjj/compton \&.
.SH "AUTHORS"
.sp
xcompmgr, originally written by Keith Packard, with contributions from Matthew Allum, Eric Anholt, Dan Doel, Thomas Luebking, Matthew Hawn, Ely Levy, Phil Blundell, and Carl Worth\&. Compton by Christopher Jeffrey, based on Dana Jansens\*(Aq original work, with contributions from Richard Grenville\&.
.SH "RESOURCES"
.sp
Homepage: https://github\&.com/chjj/compton
.SH "SEE ALSO"
.sp
\fBxcompmgr\fR(1), \fBcompton\-trans\fR(1)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,145 @@
/*
* Compton - a compositor for X11
*
* Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
*
* Copyright (c) 2011-2013, Christopher Jeffrey
* See LICENSE for more information.
*
*/
#include "common.h"
#include <ctype.h>
#include <locale.h>
#ifdef DEBUG_GLX_ERR
/**
* Get a textual representation of an OpenGL error.
*/
static inline const char *
glx_dump_err_str(GLenum err) {
switch (err) {
CASESTRRET(GL_NO_ERROR);
CASESTRRET(GL_INVALID_ENUM);
CASESTRRET(GL_INVALID_VALUE);
CASESTRRET(GL_INVALID_OPERATION);
CASESTRRET(GL_INVALID_FRAMEBUFFER_OPERATION);
CASESTRRET(GL_OUT_OF_MEMORY);
CASESTRRET(GL_STACK_UNDERFLOW);
CASESTRRET(GL_STACK_OVERFLOW);
}
return NULL;
}
/**
* Check for GLX error.
*
* http://blog.nobel-joergensen.com/2013/01/29/debugging-opengl-using-glgeterror/
*/
static inline void
glx_check_err_(session_t *ps, const char *func, int line) {
if (!ps->glx_context) return;
GLenum err = GL_NO_ERROR;
while (GL_NO_ERROR != (err = glGetError())) {
print_timestamp(ps);
printf("%s():%d: GLX error ", func, line);
const char *errtext = glx_dump_err_str(err);
if (errtext) {
printf_dbg("%s\n", errtext);
}
else {
printf_dbg("%d\n", err);
}
}
}
#define glx_check_err(ps) glx_check_err_(ps, __func__, __LINE__)
#else
#define glx_check_err(ps) ((void) 0)
#endif
/**
* Check if a word is in string.
*/
static inline bool
wd_is_in_str(const char *haystick, const char *needle) {
if (!haystick)
return false;
assert(*needle);
const char *pos = haystick - 1;
while ((pos = strstr(pos + 1, needle))) {
// Continue if it isn't a word boundary
if (((pos - haystick) && !isspace(*(pos - 1)))
|| (strlen(pos) > strlen(needle) && !isspace(pos[strlen(needle)])))
continue;
return true;
}
return false;
}
/**
* Check if a GLX extension exists.
*/
static inline bool
glx_hasglxext(session_t *ps, const char *ext) {
const char *glx_exts = glXQueryExtensionsString(ps->dpy, ps->scr);
if (!glx_exts) {
printf_errf("(): Failed get GLX extension list.");
return false;
}
bool found = wd_is_in_str(glx_exts, ext);
if (!found)
printf_errf("(): Missing GLX extension %s.", ext);
return found;
}
/**
* Check if a GLX extension exists.
*/
static inline bool
glx_hasglext(session_t *ps, const char *ext) {
const char *gl_exts = (const char *) glGetString(GL_EXTENSIONS);
if (!gl_exts) {
printf_errf("(): Failed get GL extension list.");
return false;
}
bool found = wd_is_in_str(gl_exts, ext);
if (!found)
printf_errf("(): Missing GL extension %s.", ext);
return found;
}
static inline XVisualInfo *
get_visualinfo_from_visual(session_t *ps, Visual *visual) {
XVisualInfo vreq = { .visualid = XVisualIDFromVisual(visual) };
int nitems = 0;
return XGetVisualInfo(ps->dpy, VisualIDMask, &vreq, &nitems);
}
static bool
glx_update_fbconfig(session_t *ps);
static int
glx_cmp_fbconfig(session_t *ps,
const glx_fbconfig_t *pfbc_a, const glx_fbconfig_t *pfbc_b);
static void
glx_render_color(session_t *ps, int dx, int dy, int width, int height, int z,
XserverRegion reg_tgt, const reg_data_t *pcache_reg);
static void
glx_render_dots(session_t *ps, int dx, int dy, int width, int height, int z,
XserverRegion reg_tgt, const reg_data_t *pcache_reg);
Loading…
Cancel
Save