diff --git a/src/config.c b/src/config.c index d024433..f72d42d 100644 --- a/src/config.c +++ b/src/config.c @@ -472,6 +472,7 @@ conf_tag_section(void) sec = fetch_section_first(NULL, "tags"); conf.tag_round = fetch_opt_first(sec, "false", "tag_round").bool; + conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").bool; conf.colors.tagselfg = fetch_opt_first(sec, "#ffffff", "sel_fg").str; conf.colors.tagselbg = getcolor(fetch_opt_first(sec, "#000000", "sel_bg").str); conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str; diff --git a/src/structs.h b/src/structs.h index 364fa41..55e7b33 100644 --- a/src/structs.h +++ b/src/structs.h @@ -482,6 +482,7 @@ typedef struct Rule *rule; int *ntag; Bool tag_round; + Bool tag_auto_prev; Bool client_round; Bool layout_system; /* Switch: False, Menu: True. */ Bool layout_placement; /* Right (normal): False, Left: True. */ diff --git a/src/tag.c b/src/tag.c index b9fce4f..ae1af2f 100644 --- a/src/tag.c +++ b/src/tag.c @@ -49,7 +49,7 @@ tag_set(int tag) if(seltag[selscreen] != tag) prevseltag[selscreen] = seltag[selscreen]; - else if(tag == seltag[selscreen] && tag != prevseltag[selscreen]) + else if(tag == seltag[selscreen] && tag != prevseltag[selscreen] && conf.tag_auto_prev) tag = seltag[selscreen] = prevseltag[selscreen]; else seltag[selscreen] = tag; diff --git a/wmfsrc b/wmfsrc index 9eb2a1b..ad8422d 100644 --- a/wmfsrc +++ b/wmfsrc @@ -98,6 +98,7 @@ [/default_tag] tag_round = false + tag_auto_prev = true occupied_bg = "#003366" occupied_fg = "#D4D4D4" sel_fg = "#191919"