From ec96d4d1f8f9a1052b07a03ad7579afe11b335cc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 23 Mar 2008 20:38:16 +0100 Subject: [PATCH] Add and update doc for opacity_[un]focused, and switch to float Signed-off-by: Julien Danjou --- awesomerc.5.txt | 6 +++++- common/configopts.c | 4 ++-- config.c | 4 ++-- structs.h | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/awesomerc.5.txt b/awesomerc.5.txt index 4b2de28d2..b07b6d727 100644 --- a/awesomerc.5.txt +++ b/awesomerc.5.txt @@ -53,7 +53,10 @@ new_become_master:: new_get_focus:: If this is set to true, new windows will get focus. opacity_unfocused:: - If this is set to true, non-focused windows will have this opacity. + If this is set to a float value between 0 and 100, non-focused windows will have this opacity. + This requires an external XComposite manager. +opacity_focused:: + If this is set to a float value between 0 and 100, focused windows will have this opacity. This requires an external XComposite manager. resize_hints:: If this is set to true, resize hints given by the window will be respected. @@ -558,6 +561,7 @@ screen [MULTI] new_become_master = new_get_focus = opacity_unfocused = + opacity_focused = resize_hints = sloppy_focus = sloppy_focus_raise = diff --git a/common/configopts.c b/common/configopts.c index 575d218ff..a0f379913 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -188,8 +188,8 @@ cfg_opt_t general_opts[] = CFG_BOOL((char *) "sloppy_focus_raise", cfg_false, CFGF_NONE), CFG_BOOL((char *) "new_become_master", cfg_true, CFGF_NONE), CFG_BOOL((char *) "new_get_focus", cfg_true, CFGF_NONE), - CFG_INT((char *) "opacity_unfocused", -1, CFGF_NONE), - CFG_INT((char *) "opacity_focused", -1, CFGF_NONE), + CFG_FLOAT((char *) "opacity_unfocused", -1, CFGF_NONE), + CFG_FLOAT((char *) "opacity_focused", -1, CFGF_NONE), CFG_STR((char *) "floating_placement", (char *) "smart", CFGF_NONE), CFG_FLOAT((char *) "mwfact_lower_limit", 0.1, CFGF_NONE), CFG_FLOAT((char *) "mwfact_upper_limit", 0.9, CFGF_NONE), diff --git a/config.c b/config.c index 5dedfa917..31b18e3b5 100644 --- a/config.c +++ b/config.c @@ -339,8 +339,8 @@ config_parse_screen(cfg_t *cfg, int screen) virtscreen->sloppy_focus_raise = cfg_getbool(cfg_general, "sloppy_focus_raise"); virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master"); virtscreen->new_get_focus = cfg_getbool(cfg_general, "new_get_focus"); - virtscreen->opacity_unfocused = cfg_getint(cfg_general, "opacity_unfocused"); - virtscreen->opacity_focused = cfg_getint(cfg_general, "opacity_focused"); + virtscreen->opacity_unfocused = cfg_getfloat(cfg_general, "opacity_unfocused"); + virtscreen->opacity_focused = cfg_getfloat(cfg_general, "opacity_focused"); virtscreen->floating_placement = name_func_lookup(cfg_getstr(cfg_general, "floating_placement"), FloatingPlacementList); diff --git a/structs.h b/structs.h index 72f61dbe9..4e6c2d121 100644 --- a/structs.h +++ b/structs.h @@ -306,9 +306,9 @@ typedef struct style_t urgent; } styles; /** Transparency of unfocused clients */ - int opacity_unfocused; + double opacity_unfocused; /** Transparency of focused clients */ - int opacity_focused; + double opacity_focused; /** Tag list */ Tag *tags; /** Layout list */