diff --git a/awesomerc.1.txt b/awesomerc.1.txt index 7b5043327..c8b11e84d 100644 --- a/awesomerc.1.txt +++ b/awesomerc.1.txt @@ -426,7 +426,7 @@ rules name = xproperty_name = xproperty_value = - float = <{auto,true,false}> + float = tags = screen = icon = diff --git a/config.c b/config.c index 5398b1f54..918d349e5 100644 --- a/config.c +++ b/config.c @@ -668,7 +668,7 @@ config_parse(const char *confpatharg) CFG_STR((char *) "name", NULL, CFGF_NONE), CFG_STR((char *) "tags", NULL, CFGF_NONE), CFG_STR((char *) "icon", NULL, CFGF_NONE), - CFG_STR((char *) "float", (char *) "auto", CFGF_NONE), + CFG_BOOL((char *) "float", cfg_false, CFGF_NONE), CFG_INT((char *) "screen", RULE_NOSCREEN, CFGF_NONE), CFG_BOOL((char *) "not_master", cfg_false, CFGF_NONE), CFG_END() @@ -776,7 +776,7 @@ config_parse(const char *confpatharg) rule->xprop = a_strdup(cfg_getstr(cfgsectmp, "xproperty_name")); rule->xpropval_r = rules_compile_regex(cfg_getstr(cfgsectmp, "xproperty_value")); rule->icon = a_strdup(cfg_getstr(cfgsectmp, "icon")); - rule->isfloating = rules_get_float_from_str(cfg_getstr(cfgsectmp, "float")); + rule->isfloating = cfg_getbool(cfgsectmp, "float"); rule->screen = cfg_getint(cfgsectmp, "screen"); rule->not_master = cfg_getbool(cfgsectmp, "not_master"); if(rule->screen >= get_screen_count()) diff --git a/config.h b/config.h index 2b065c540..754507164 100644 --- a/config.h +++ b/config.h @@ -36,13 +36,6 @@ typedef enum Off } Position; -typedef enum -{ - Float, - Tile, - Auto, -} RuleFloat; - /** Common colors */ enum { ColBorder, ColFG, ColBG, ColLast }; @@ -56,7 +49,7 @@ struct Rule char *icon; char *xprop; int screen; - RuleFloat isfloating; + Bool isfloating; Bool not_master; regex_t *prop_r; regex_t *tags_r; diff --git a/event.c b/event.c index 919c63ff9..e8005aa19 100644 --- a/event.c +++ b/event.c @@ -160,9 +160,6 @@ handle_event_configurerequest(XEvent * e) { old_screen = c->screen; - if(get_current_layout(c->screen)->arrange != layout_floating) - c->isfloating = True; - /* if not resized, send event anyway */ if(!client_resize(c, geometry, False)) { diff --git a/rules.c b/rules.c index 702ad2fe5..1def6a8a1 100644 --- a/rules.c +++ b/rules.c @@ -97,16 +97,4 @@ is_tag_match_rules(Tag *t, Rule *r) return False; } - -RuleFloat -rules_get_float_from_str(const char *str) -{ - if(!a_strcmp(str, "true") || !a_strcmp(str, "yes")) - return Float; - else if(!a_strcmp(str, "false") || !a_strcmp(str, "no")) - return Tile; - - return Auto; -} - // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/rules.h b/rules.h index 2664eb937..390b76a40 100644 --- a/rules.h +++ b/rules.h @@ -29,7 +29,6 @@ regex_t * rules_compile_regex(char *); Bool client_match_rule(Client *, Rule *); Bool is_tag_match_rules(Tag *, Rule *); -RuleFloat rules_get_float_from_str(const char *); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/tag.c b/tag.c index ba885bf86..d8c4c52ab 100644 --- a/tag.c +++ b/tag.c @@ -121,17 +121,7 @@ tag_client_with_rules(Client *c) for(r = globalconf.rules; r; r = r->next) if(client_match_rule(c, r)) { - switch(r->isfloating) - { - case Tile: - c->isfloating = False; - break; - case Float: - c->isfloating = True; - break; - default: - break; - } + c->isfloating = r->isfloating; if(r->screen != RULE_NOSCREEN && r->screen != c->screen) move_client_to_screen(c, r->screen, True);