Feature #113: Set opacity based on conditions

- Add --opacity-rule, which sets opacity based on conditions, as
  requested by zabbal. (#113)

- Add a data field for each condition.

- Correct the FAQ link in README.md. Silly me.

- Code clean-up.
This commit is contained in:
Richard Grenville
2013-05-21 09:18:41 +08:00
parent 07bc7485c3
commit 75ebd56f74
6 changed files with 116 additions and 8 deletions

View File

@ -415,6 +415,17 @@ win_has_frame(const win *w) {
|| w->top_width || w->left_width || w->right_width || w->bottom_width;
}
static inline void
wid_set_opacity_prop(session_t *ps, Window wid, long val) {
XChangeProperty(ps->dpy, wid, ps->atom_opacity, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *) &val, 1);
}
static inline void
wid_rm_opacity_prop(session_t *ps, Window wid) {
XDeleteProperty(ps->dpy, wid, ps->atom_opacity);
}
/**
* Dump an drawable's info.
*/