From fe3008d971942f4d14dd134b39b8ee825126ad0e Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 25 Feb 2025 11:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E6=89=93=E5=8D=B0=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不打印无用信息 --- maomao.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/maomao.c b/maomao.c index 7e06fab5..54e5c456 100644 --- a/maomao.c +++ b/maomao.c @@ -3787,46 +3787,12 @@ pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy, void // 17 printstatus(void) { Monitor *m = NULL; - Client *c; - uint32_t occ, urg, sel; - const char *appid, *title; - wl_list_for_each(m, &mons, link) { if (!m->wlr_output->enabled) { continue; } - occ = urg = 0; - wl_list_for_each(c, &clients, link) { - if (c->mon != m) - continue; - occ |= c->tags; - if (c->isurgent) - urg |= c->tags; - } - if ((c = focustop(m))) { - title = client_get_title(c); - appid = client_get_appid(c); - printf("%s title %s\n", m->wlr_output->name, title ? title : broken); - printf("%s appid %s\n", m->wlr_output->name, appid ? appid : broken); - printf("%s fullscreen %u\n", m->wlr_output->name, c->isfullscreen); - printf("%s floating %u\n", m->wlr_output->name, c->isfloating); - sel = c->tags; - } else { - printf("%s title \n", m->wlr_output->name); - printf("%s appid \n", m->wlr_output->name); - printf("%s fullscreen \n", m->wlr_output->name); - printf("%s floating \n", m->wlr_output->name); - sel = 0; - } - - printf("%s selmon %u\n", m->wlr_output->name, m == selmon); - printf("%s tags %u %u %u %u\n", m->wlr_output->name, occ, - m->tagset[m->seltags], sel, urg); - printf("%s layout %s\n", m->wlr_output->name, - m->pertag->ltidxs[m->pertag->curtag]->symbol); dwl_ipc_output_printstatus(m); // 更新waybar上tag的状态 这里很关键 } - fflush(stdout); } void // 0.5