diff --git a/src/config.c b/src/config.c index 080bd07..9f96267 100644 --- a/src/config.c +++ b/src/config.c @@ -449,14 +449,6 @@ conf_tag_section(void) struct conf_sec *sec, **tag, **mouse; struct opt_type *opt; - /* If there is no tag in the conf or more than - * MAXTAG (36) print an error and create only one. - */ - Tag default_tag = { "WMFS", NULL, 0, 1, - 0.50, 1, False, False, False, False, IB_Top, - layout_name_to_struct(conf.layout, "tile_right", conf.nlayout, layout_list), - 0, NULL, 0 }; - sec = fetch_section_first(NULL, "tags"); conf.tag_round = fetch_opt_first(sec, "false", "tag_round").bool; @@ -469,6 +461,15 @@ conf_tag_section(void) conf.tagautohide = fetch_opt_first(sec, "false", "autohide").bool; conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").bool; conf.tagdefaultname = fetch_opt_first(sec, "new tag", "default_name").str; + conf.tagdefaultlayout = fetch_opt_first(sec, "tile_right", "default_layout").str; + + /* If there is no tag in the conf or more than + * MAXTAG (36) print an error and create only one. + */ + Tag default_tag = { "WMFS", NULL, 0, 1, + 0.50, 1, False, False, False, False, IB_Top, + layout_name_to_struct(conf.layout, conf.tagdefaultlayout, conf.nlayout, layout_list), + 0, NULL, 0 }; /* Mouse button action on tag */ conf.mouse_tag_action[TagSel] = diff --git a/src/structs.h b/src/structs.h index a953a55..148d305 100644 --- a/src/structs.h +++ b/src/structs.h @@ -348,6 +348,7 @@ typedef struct Bool tagautohide; Bool tagnamecount; char * tagdefaultname; + char * tagdefaultlayout; uint pad; int status_timing; char *status_path; diff --git a/src/tag.c b/src/tag.c index 59029be..ca35f10 100644 --- a/src/tag.c +++ b/src/tag.c @@ -475,7 +475,7 @@ tag_new(int s, char *name) char * displayedName; Tag t = { NULL, NULL, 0, 0, 0.65, 1, False, False, False, False, IB_Top, - layout_name_to_struct(conf.layout, "tile_right", conf.nlayout, layout_list), 0, NULL, 0 }; + layout_name_to_struct(conf.layout, conf.tagdefaultlayout, conf.nlayout, layout_list), 0, NULL, 0 }; if(conf.ntag[s] + 1 > MAXTAG) { diff --git a/wmfsrc.in b/wmfsrc.in index c30986d..f27ccc2 100644 --- a/wmfsrc.in +++ b/wmfsrc.in @@ -68,15 +68,16 @@ [/layouts] [tags] - tag_round = false - occupied_bg = "#003366" - sel_fg = "#191919" - sel_bg = "#7E89A2" - urgent_bg = "#DD1111" - urgent_fg = "#000000" + tag_round = false + occupied_bg = "#003366" + sel_fg = "#191919" + sel_bg = "#7E89A2" + urgent_bg = "#DD1111" + urgent_fg = "#000000" # If true, number of the tag will be used for name - name_count = false - default_name= "new tag" # default name for a new tag + name_count = false + default_name = "new tag" # default name for a new tag + default_layout = "tile_right" # Border around the tag buttons. border = true