Conf: Move [systray] section in [bar] section
This commit is contained in:
parent
461b45545a
commit
1d5792b278
39
src/config.c
39
src/config.c
@ -182,8 +182,8 @@ conf_misc_section(void)
|
||||
void
|
||||
conf_bar_section(void)
|
||||
{
|
||||
struct conf_sec *bar, **mouse, *selbar;
|
||||
char *barbg;
|
||||
struct conf_sec *bar, **mouse, *selbar, *systray;
|
||||
char *barbg, sc = screen_count();
|
||||
|
||||
bar = fetch_section_first(NULL, "bar");
|
||||
|
||||
@ -202,6 +202,20 @@ conf_bar_section(void)
|
||||
|
||||
free(mouse);
|
||||
|
||||
if((systray = fetch_section_first(bar, "systray")))
|
||||
{
|
||||
conf.systray.active = fetch_opt_first(systray, "true", "active").bool;
|
||||
|
||||
if((conf.systray.screen = fetch_opt_first(systray, "0", "screen").num) < 0
|
||||
|| conf.systray.screen >= sc)
|
||||
conf.systray.screen = 0;
|
||||
|
||||
if((conf.systray.spacing = fetch_opt_first(systray, "3", "spacing").num) < 0)
|
||||
conf.systray.spacing = 0;
|
||||
}
|
||||
else
|
||||
conf.systray.active = False;
|
||||
|
||||
selbar = fetch_section_first(bar, "selbar");
|
||||
conf.bars.selbar = selbar ? True : False;
|
||||
|
||||
@ -719,26 +733,6 @@ conf_keybind_section(void)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
conf_systray_section(void)
|
||||
{
|
||||
struct conf_sec *systray;
|
||||
int sc = screen_count();
|
||||
|
||||
systray = fetch_section_first(NULL, "systray");
|
||||
|
||||
conf.systray.active = fetch_opt_first(systray, "true", "active").bool;
|
||||
|
||||
if((conf.systray.screen = fetch_opt_first(systray, "0", "screen").num) < 0
|
||||
|| conf.systray.screen >= sc)
|
||||
conf.systray.screen = 0;
|
||||
|
||||
if((conf.systray.spacing = fetch_opt_first(systray, "3", "spacing").num) < 0)
|
||||
conf.systray.spacing = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/** Configuration initialization
|
||||
*/
|
||||
void
|
||||
@ -767,7 +761,6 @@ init_conf(void)
|
||||
conf_menu_section();
|
||||
conf_launcher_section();
|
||||
conf_keybind_section();
|
||||
conf_systray_section();
|
||||
|
||||
print_unused(NULL);
|
||||
|
||||
|
||||
@ -216,7 +216,6 @@ systray_find(Window win)
|
||||
if(!conf.systray.active)
|
||||
return NULL;
|
||||
|
||||
|
||||
for(i = trayicons; i; i = i->next)
|
||||
if(i->win == win)
|
||||
return i;
|
||||
|
||||
22
wmfsrc.in
22
wmfsrc.in
@ -20,6 +20,17 @@
|
||||
border = true
|
||||
# selbar = false #not worked now, see section [selbar]
|
||||
|
||||
[systray]
|
||||
# Enable/disable systray
|
||||
active = true
|
||||
|
||||
# Screen of systray
|
||||
screen = 0
|
||||
|
||||
# Spacing between tray icons
|
||||
spacing = 3
|
||||
[/systray]
|
||||
|
||||
# Remove this section to disable the selbar.
|
||||
[selbar]
|
||||
bg = "#191919"
|
||||
@ -35,17 +46,6 @@
|
||||
|
||||
[/bar]
|
||||
|
||||
[systray]
|
||||
# Enable/disable systray
|
||||
active = true
|
||||
|
||||
# Screen of systray
|
||||
screen = 0
|
||||
|
||||
# Spacing between tray icons
|
||||
spacing = 3
|
||||
[/systray]
|
||||
|
||||
[layouts]
|
||||
fg = "#191919"
|
||||
bg = "#7E89A2"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user