diff --git a/src/config.c b/src/config.c index ad80374..7800798 100644 --- a/src/config.c +++ b/src/config.c @@ -381,10 +381,11 @@ conf_layout_section(void) layouts = fetch_section_first(NULL, "layouts"); - conf.border.layout = fetch_opt_first(layouts, "false", "border").bool; - conf.colors.layout_fg = fetch_opt_first(layouts, "#ffffff", "fg").str; - conf.colors.layout_bg = getcolor((fetch_opt_first(layouts, "#000000", "bg").str)); - conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").bool; + conf.border.layout = fetch_opt_first(layouts, "false", "border").bool; + conf.colors.layout_fg = fetch_opt_first(layouts, "#ffffff", "fg").str; + conf.colors.layout_bg = getcolor((fetch_opt_first(layouts, "#000000", "bg").str)); + conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").bool; + conf.selected_layout_symbol = fetch_opt_first(layouts, "*", "selected_layout_symbol").str; if((tmp = fetch_opt_first(layouts, "menu", "system").str) && !strcmp(tmp, "menu")) conf.layout_system = True; diff --git a/src/menu.c b/src/menu.c index a6de827..3e573a0 100644 --- a/src/menu.c +++ b/src/menu.c @@ -266,7 +266,7 @@ menu_draw_item_name(Menu *menu, int item, BarWindow *winitem[]) if(menu->item[item].check) if(menu->item[item].check(menu->item[item].cmd)) - barwin_draw_text(winitem[item], PAD / 3, FHINFOBAR, "*"); + barwin_draw_text(winitem[item], PAD / 3, FHINFOBAR, conf.selected_layout_symbol); if(menu->item[item].submenu) barwin_draw_text(winitem[item], width + PAD * 2, FHINFOBAR, ">"); diff --git a/src/structs.h b/src/structs.h index e3d8205..7c09110 100644 --- a/src/structs.h +++ b/src/structs.h @@ -448,6 +448,7 @@ typedef struct Bool layout_system; /* Switch: False, Menu: True. */ Bool layout_placement; /* Right (normal): False, Left: True. */ Bool keep_layout_geo; + char *selected_layout_symbol; /* Number of... */ int nkeybind; int nlayout; diff --git a/wmfsrc.in b/wmfsrc.in index 634f8f0..07bfdc6 100644 --- a/wmfsrc.in +++ b/wmfsrc.in @@ -51,6 +51,9 @@ # Keep layout geo for free layout keep_layout_geo = false + # Symbol displayed for the selected layout in the list + selected_layout_symbol = "*" + # Tiling layouts. [layout] type = "tile_right" symbol = "RIGHT" [/layout] [layout] type = "tile_left" symbol = "LEFT" [/layout]