From 5d4ed8f43f17c4afab3151242a8a2e276367f979 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Mon, 26 Aug 2013 22:00:53 +0800 Subject: [PATCH] Misc: Add missing configuration file options and switches - Add "xinerama_shadow_crop" configuration option. - Add long commandline switches corresponding to the short ones. - Documentation update. --- README.md | 1 + compton.sample.conf | 3 ++- man/compton.1.asciidoc | 3 +++ src/compton.c | 17 +++++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 109b8fdf..6efc8ef6 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ __R__ for runtime * libXext (B,R) * libxrender (B,R) * libXrandr (B,R) +* libXinerama (B,R) (Can be disabled with `NO_XINERAMA` at compile time) * pkg-config (B) * make (B) * xproto / x11proto (B) diff --git a/compton.sample.conf b/compton.sample.conf index 3f085cfb..8f3db47c 100644 --- a/compton.sample.conf +++ b/compton.sample.conf @@ -13,7 +13,8 @@ shadow-offset-y = -7; shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'" ]; # shadow-exclude = "n:e:Notification"; shadow-ignore-shaped = false; -# shadow-exclude-reg = "x10+0+0" +# shadow-exclude-reg = "x10+0+0"; +# xinerama-shadow-crop = true; # Opacity menu-opacity = 0.8; diff --git a/man/compton.1.asciidoc b/man/compton.1.asciidoc index 0219a6dc..745879bf 100644 --- a/man/compton.1.asciidoc +++ b/man/compton.1.asciidoc @@ -222,6 +222,9 @@ May also be one of the predefined kernels: `3x3box` (default), `5x5box`, `7x7box *--shadow-exclude-reg* 'GEOMETRY':: 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. +*--xinerama-shadow-crop*:: + Crop shadow of a window fully on a particular Xinerama screen to the screen. + *--backend* 'BACKEND':: 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. diff --git a/src/compton.c b/src/compton.c index 6fe92798..e2b714e3 100644 --- a/src/compton.c +++ b/src/compton.c @@ -5111,6 +5111,9 @@ parse_config(session_t *ps, struct options_tmp *pcfgtmp) { // --detect-rounded-corners lcfg_lookup_bool(&cfg, "detect-rounded-corners", &ps->o.detect_rounded_corners); + // --xinerama-shadow-crop + lcfg_lookup_bool(&cfg, "xinerama-shadow-crop", + &ps->o.xinerama_shadow_crop); // --detect-client-opacity lcfg_lookup_bool(&cfg, "detect-client-opacity", &ps->o.detect_client_opacity); @@ -5217,6 +5220,20 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) { const static struct option longopts[] = { { "help", no_argument, NULL, 'h' }, { "config", required_argument, NULL, 256 }, + { "shadow-radius", required_argument, NULL, 'r' }, + { "shadow-opacity", required_argument, NULL, 'o' }, + { "shadow-offset-x", required_argument, NULL, 'l' }, + { "shadow-offset-y", required_argument, NULL, 't' }, + { "fade-in-step", required_argument, NULL, 'I' }, + { "fade-out-step", required_argument, NULL, 'O' }, + { "menu-opacity", required_argument, NULL, 'm' }, + { "shadow", no_argument, NULL, 'c' }, + { "no-dock-shadow", no_argument, NULL, 'C' }, + { "clear-shadow", no_argument, NULL, 'z' }, + { "fading", no_argument, NULL, 'f' }, + { "inactive-opacity", required_argument, NULL, 'i' }, + { "frame-opacity", required_argument, NULL, 'e' }, + { "no-dnd-shadow", no_argument, NULL, 'G' }, { "shadow-red", required_argument, NULL, 257 }, { "shadow-green", required_argument, NULL, 258 }, { "shadow-blue", required_argument, NULL, 259 },