mirror of
https://github.com/kolunmi/dwlb.git
synced 2025-12-19 04:23:20 +00:00
Merge 5221e192f34c594da697a1ef7cdf62c407fdb7ec into 48dbe00bdb98a1ae6a0e60558ce14503616aa759
This commit is contained in:
commit
4ec97f2ea8
22
dwlb.c
22
dwlb.c
@ -1463,6 +1463,10 @@ read_socket(void)
|
|||||||
|
|
||||||
ADVANCE_IF_LAST_RET();
|
ADVANCE_IF_LAST_RET();
|
||||||
|
|
||||||
|
char *cmd = wordbeg;
|
||||||
|
|
||||||
|
ADVANCE_IF_LAST_RET();
|
||||||
|
|
||||||
Bar *bar = NULL, *it;
|
Bar *bar = NULL, *it;
|
||||||
bool all = false;
|
bool all = false;
|
||||||
|
|
||||||
@ -1489,7 +1493,7 @@ read_socket(void)
|
|||||||
|
|
||||||
ADVANCE();
|
ADVANCE();
|
||||||
|
|
||||||
if (!strcmp(wordbeg, "status")) {
|
if (!strcmp(cmd, "status")) {
|
||||||
if (!*wordend)
|
if (!*wordend)
|
||||||
return;
|
return;
|
||||||
if (all) {
|
if (all) {
|
||||||
@ -1507,7 +1511,7 @@ read_socket(void)
|
|||||||
parse_into_customtext(&bar->status, wordend);
|
parse_into_customtext(&bar->status, wordend);
|
||||||
bar->redraw = true;
|
bar->redraw = true;
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "title")) {
|
} else if (!strcmp(cmd, "title")) {
|
||||||
if (!custom_title || !*wordend)
|
if (!custom_title || !*wordend)
|
||||||
return;
|
return;
|
||||||
if (all) {
|
if (all) {
|
||||||
@ -1525,7 +1529,7 @@ read_socket(void)
|
|||||||
parse_into_customtext(&bar->title, wordend);
|
parse_into_customtext(&bar->title, wordend);
|
||||||
bar->redraw = true;
|
bar->redraw = true;
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "show")) {
|
} else if (!strcmp(cmd, "show")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (bar->hidden)
|
if (bar->hidden)
|
||||||
@ -1534,7 +1538,7 @@ read_socket(void)
|
|||||||
if (bar->hidden)
|
if (bar->hidden)
|
||||||
show_bar(bar);
|
show_bar(bar);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "hide")) {
|
} else if (!strcmp(cmd, "hide")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (!bar->hidden)
|
if (!bar->hidden)
|
||||||
@ -1543,7 +1547,7 @@ read_socket(void)
|
|||||||
if (!bar->hidden)
|
if (!bar->hidden)
|
||||||
hide_bar(bar);
|
hide_bar(bar);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "toggle-visibility")) {
|
} else if (!strcmp(cmd, "toggle-visibility")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (bar->hidden)
|
if (bar->hidden)
|
||||||
@ -1556,27 +1560,25 @@ read_socket(void)
|
|||||||
else
|
else
|
||||||
hide_bar(bar);
|
hide_bar(bar);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "set-top")) {
|
} else if (!strcmp(cmd, "set-top")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (bar->bottom)
|
if (bar->bottom)
|
||||||
set_top(bar);
|
set_top(bar);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (bar->bottom)
|
if (bar->bottom)
|
||||||
set_top(bar);
|
set_top(bar);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "set-bottom")) {
|
} else if (!strcmp(cmd, "set-bottom")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (!bar->bottom)
|
if (!bar->bottom)
|
||||||
set_bottom(bar);
|
set_bottom(bar);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!bar->bottom)
|
if (!bar->bottom)
|
||||||
set_bottom(bar);
|
set_bottom(bar);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(wordbeg, "toggle-location")) {
|
} else if (!strcmp(cmd, "toggle-location")) {
|
||||||
if (all) {
|
if (all) {
|
||||||
wl_list_for_each(bar, &bar_list, link)
|
wl_list_for_each(bar, &bar_list, link)
|
||||||
if (bar->bottom)
|
if (bar->bottom)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user