diff options
| author | Ben Collerson <benc@benc.cc> | 2022-11-23 21:55:04 +1000 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-02-13 13:30:27 -0600 | 
| commit | 7f9a21247613a0d8ba6575869220e29071a40c64 (patch) | |
| tree | 74e58c04d31eda17a06a6e442d102a56d1059b7e | |
| parent | ab8334bd8a85c5c63a2d06bc68bf0b5f5e1c2923 (diff) | |
Add appid field to printstatus() output
Adds an appid field to printstatus which can be used to monitor the
currently active application.
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 7 | 
1 files changed, 6 insertions, 1 deletions
@@ -1823,6 +1823,7 @@ printstatus(void)  	Monitor *m = NULL;  	Client *c;  	unsigned int occ, urg, sel; +	const char *appid, *title;  	wl_list_for_each(m, &mons, link) {  		occ = urg = 0; @@ -1834,12 +1835,16 @@ printstatus(void)  				urg |= c->tags;  		}  		if ((c = focustop(m))) { -			printf("%s title %s\n", m->wlr_output->name, client_get_title(c)); +			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;  | 
