From 631fdd6bcf20404fd6c05affa8785af2d1a87f91 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 17 Nov 2021 09:54:57 +0500 Subject: [PATCH] Add and use DWM function "updatebars" --- src/dwm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dwm.c b/src/dwm.c index 3986c60..b3bfeb8 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -265,6 +265,7 @@ static void unfocus(Client *c, int setfocus); static void unmanage(Client *c, int destroyed); static void updatebarpos(Monitor *m); static void updatebar(Monitor *m); +static void updatebars(); static void updateclientlist(void); static int updategeom(void); static void updatenumlockmask(void); @@ -1914,7 +1915,7 @@ togglebar(const Arg *arg) { unit_toggle_show_bar(selmon->pertag->units[selmon->pertag->curtag]); - updatebar(selmon); + updatebars(); } void @@ -2072,6 +2073,14 @@ updatebar(Monitor *m) arrange(m); } +void +updatebars() +{ + for (Monitor *m = mons; m; m = m->next) { + updatebar(m); + } +} + void updatebarpos(Monitor *m) {