|
@@ -113,11 +113,17 @@ mouse_section(MouseBinding mb[], char *src, int ns)
|
|
|
for(i = 0; i < ns; ++i)
|
|
|
{
|
|
|
tmp = get_nsec(src, "mouse", i);
|
|
|
+
|
|
|
+ set_current_sauv(tmp);
|
|
|
+
|
|
|
mb[i].tag = get_opt(tmp, "-1", "tag").num;
|
|
|
mb[i].screen = get_opt(tmp, "-1", "screen").num;
|
|
|
mb[i].button = char_to_button(get_opt(tmp, "1", "button").str, mouse_button_list);
|
|
|
mb[i].func = name_to_func(get_opt(tmp, "", "func").str, func_list);
|
|
|
mb[i].cmd = get_opt(tmp, "", "cmd").str;
|
|
|
+
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return;
|
|
@@ -128,6 +134,8 @@ conf_misc_section(char *src)
|
|
|
{
|
|
|
int pad = 12;
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.font = get_opt(src, "sans-9", "font").str;
|
|
|
conf.raisefocus = get_opt(src, "false", "raisefocus").bool;
|
|
|
conf.raiseswitch = get_opt(src, "false", "raiseswitch").bool;
|
|
@@ -149,6 +157,8 @@ conf_misc_section(char *src)
|
|
|
void
|
|
|
conf_bar_section(char *src)
|
|
|
{
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.border.bar = get_opt(src, "false", "border").bool;
|
|
|
conf.bars.height = get_opt(src, "-1", "height").num;
|
|
|
conf.colors.bar = getcolor(get_opt(src, "#000000", "bg").str);
|
|
@@ -166,6 +176,8 @@ conf_bar_section(char *src)
|
|
|
void
|
|
|
conf_root_section(char *src)
|
|
|
{
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.root.background_command = get_opt(src, "", "background_command").str;
|
|
|
|
|
|
if((conf.root.nmouse = get_size_sec(src, "mouse")))
|
|
@@ -185,6 +197,8 @@ conf_client_section(char *src)
|
|
|
opt_type *buf;
|
|
|
|
|
|
/* Client misc */
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.client.borderheight = (get_opt(src, "1", "border_height").num) ? get_opt(src, "1", "border_height").num : 1;
|
|
|
conf.client.border_shadow = get_opt(src, "false", "border_shadow").bool;
|
|
|
conf.client.place_at_mouse = get_opt(src, "false", "place_at_mouse").bool;
|
|
@@ -203,6 +217,8 @@ conf_client_section(char *src)
|
|
|
|
|
|
/* Titlebar part {{ */
|
|
|
tmp = get_sec(src, "titlebar");
|
|
|
+ set_current_sauv(tmp);
|
|
|
+
|
|
|
conf.titlebar.height = get_opt(tmp, "0", "height").num;
|
|
|
conf.titlebar.fg_normal = get_opt(tmp, "#ffffff", "fg_normal").str;
|
|
|
conf.titlebar.fg_focus = get_opt(tmp, "#000000", "fg_focus").str;
|
|
@@ -234,6 +250,8 @@ conf_client_section(char *src)
|
|
|
{
|
|
|
tmp2 = get_nsec(tmp, "button", i);
|
|
|
|
|
|
+ set_current_sauv(tmp2);
|
|
|
+
|
|
|
/* Multi mouse section */
|
|
|
if((conf.titlebar.button[i].nmouse = get_size_sec(tmp2, "mouse")))
|
|
|
{
|
|
@@ -257,6 +275,8 @@ conf_client_section(char *src)
|
|
|
conf.titlebar.button[i].linecoord[j].y2 = buf[3].num;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ set_current_sauv(tmp);
|
|
|
}
|
|
|
}
|
|
|
/* }} */
|
|
@@ -277,6 +297,8 @@ conf_layout_section(char *src)
|
|
|
conf.layout[i].func = NULL;
|
|
|
}
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.border.layout = get_opt(src, "false", "border").bool;
|
|
|
conf.colors.layout_fg = get_opt(src, "#ffffff", "fg").str;
|
|
|
conf.colors.layout_bg = getcolor((get_opt(src, "#000000", "bg").str));
|
|
@@ -312,6 +334,8 @@ conf_layout_section(char *src)
|
|
|
{
|
|
|
tmp = get_nsec(src, "layout", i);
|
|
|
|
|
|
+ set_current_sauv(tmp);
|
|
|
+
|
|
|
if(!name_to_func((p = get_opt(tmp, "tile", "type").str), layout_list))
|
|
|
warnx("configuration : Unknown Layout type : \"%s\".", p);
|
|
|
else
|
|
@@ -323,6 +347,8 @@ conf_layout_section(char *src)
|
|
|
conf.layout[i].symbol = get_opt(tmp, "TILE (default)", "symbol").str;
|
|
|
conf.layout[i].func = name_to_func(p, layout_list);
|
|
|
}
|
|
|
+
|
|
|
+ set_current_sauv(src);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -343,6 +369,8 @@ conf_tag_section(char *src)
|
|
|
0.50, 1, False, False, IB_Top,
|
|
|
layout_name_to_struct(conf.layout, "tile_right", conf.nlayout, layout_list) };
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.tag_round = get_opt(src, "false", "tag_round").bool;
|
|
|
conf.colors.tagselfg = get_opt(src, "#ffffff", "sel_fg").str;
|
|
|
conf.colors.tagselbg = getcolor(get_opt(src, "#000000", "sel_bg").str);
|
|
@@ -366,6 +394,8 @@ conf_tag_section(char *src)
|
|
|
{
|
|
|
/* printf("%d -> %s\n", i, (cfgtmp = get_nsec(src, "tag", i)));*/
|
|
|
cfgtmp = get_nsec(src, "tag", i);
|
|
|
+ set_current_sauv(cfgtmp);
|
|
|
+
|
|
|
j = get_opt(cfgtmp, "-1", "screen").num;
|
|
|
|
|
|
if(j < 0 || j > sc - 1)
|
|
@@ -408,6 +438,7 @@ conf_tag_section(char *src)
|
|
|
|
|
|
}
|
|
|
l = 0;
|
|
|
+ set_current_sauv(src);
|
|
|
}
|
|
|
|
|
|
for(i = 0; i < sc; ++i)
|
|
@@ -427,6 +458,8 @@ conf_menu_section(char *src)
|
|
|
char *tmp, *tmp2;
|
|
|
int i, j;
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
CHECK((conf.nmenu = get_size_sec(src, "set_menu")));
|
|
|
|
|
|
conf.menu = calloc(conf.nmenu, sizeof(Menu));
|
|
@@ -434,6 +467,7 @@ conf_menu_section(char *src)
|
|
|
for(i = 0; i < conf.nmenu; ++i)
|
|
|
{
|
|
|
tmp = get_nsec(src, "set_menu", i);
|
|
|
+ set_current_sauv(tmp);
|
|
|
|
|
|
conf.menu[i].name = get_opt(tmp, "menu_wname", "name").str;
|
|
|
|
|
@@ -454,12 +488,17 @@ conf_menu_section(char *src)
|
|
|
for(j = 0; j < get_size_sec(tmp, "item"); ++j)
|
|
|
{
|
|
|
tmp2 = get_nsec(tmp, "item", j);
|
|
|
+ set_current_sauv(tmp2);
|
|
|
|
|
|
conf.menu[i].item[j].name = get_opt(tmp2, "item_wname", "name").str;
|
|
|
conf.menu[i].item[j].func = name_to_func(get_opt(tmp2, "", "func").str, func_list);
|
|
|
conf.menu[i].item[j].cmd = (!get_opt(tmp2, "", "cmd").str) ? NULL : get_opt(tmp2, "", "cmd").str;
|
|
|
+
|
|
|
+ set_current_sauv(tmp);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ set_current_sauv(src);
|
|
|
}
|
|
|
|
|
|
return;
|
|
@@ -471,6 +510,8 @@ conf_launcher_section(char *src)
|
|
|
int i;
|
|
|
char *tmp;
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
CHECK((conf.nlauncher = get_size_sec(src, "set_launcher")));
|
|
|
|
|
|
conf.launcher = emalloc(conf.nlauncher, sizeof(Launcher));
|
|
@@ -478,10 +519,13 @@ conf_launcher_section(char *src)
|
|
|
for(i = 0; i < conf.nlauncher; ++i)
|
|
|
{
|
|
|
tmp = get_nsec(src, "set_launcher", i);
|
|
|
+ set_current_sauv(tmp);
|
|
|
|
|
|
conf.launcher[i].name = get_opt(tmp, "launcher", "name").str;
|
|
|
conf.launcher[i].prompt = get_opt(tmp, "Exec:", "prompt").str;
|
|
|
conf.launcher[i].command = get_opt(tmp, "exec", "command").str;
|
|
|
+
|
|
|
+ set_current_sauv(src);
|
|
|
}
|
|
|
|
|
|
return;
|
|
@@ -494,18 +538,24 @@ conf_keybind_section(char *src)
|
|
|
char *tmp;
|
|
|
opt_type *buf;
|
|
|
|
|
|
+ set_current_sauv(src);
|
|
|
+
|
|
|
conf.nkeybind = get_size_sec(src, "key");
|
|
|
keys = emalloc(conf.nkeybind, sizeof(Key));
|
|
|
|
|
|
for(i = 0; i < conf.nkeybind; ++i)
|
|
|
{
|
|
|
tmp = get_nsec(src, "key", i);
|
|
|
+
|
|
|
+ set_current_sauv(tmp);
|
|
|
+
|
|
|
buf = get_list_opt(tmp, "", "mod", &n);
|
|
|
|
|
|
for(j = 0; j < n; ++j)
|
|
|
keys[i].mod |= char_to_modkey(buf[j].str, key_list);
|
|
|
|
|
|
keys[i].keysym = XStringToKeysym(get_opt(tmp, "None", "key").str);
|
|
|
+
|
|
|
keys[i].func = name_to_func(get_opt(tmp, "", "func").str, func_list);
|
|
|
|
|
|
if(keys[i].func == NULL)
|
|
@@ -515,6 +565,8 @@ conf_keybind_section(char *src)
|
|
|
}
|
|
|
|
|
|
keys[i].cmd = (!get_opt(tmp, "", "cmd").str) ? NULL : get_opt(tmp, "", "cmd").str;
|
|
|
+
|
|
|
+ set_current_sauv(src);
|
|
|
}
|
|
|
|
|
|
return;
|