add experimental icon support for switcher, still some work to do on it

This commit is contained in:
speedie 2023-01-08 03:39:56 +01:00
parent 738340050a
commit bba82bcdfe
2 changed files with 7 additions and 3 deletions

1
TODO
View file

@ -4,7 +4,6 @@
- Logo to replace speedwm.png
- Click to minimize
- Perhaps introduce padding around text/bar
- Icon support for the switcher. I've done this before but never finished it due to extensive changes it required.
- Weather module: Allow configuring it
- rainbowtags but for the layout indicator
- maybe powerlines for layout indicator

View file

@ -3726,18 +3726,23 @@ drawswitcher(int nwins, int first, Monitor *m)
}
h = selmon->maxheight / m->nclients;
h = selmon->maxheight / m->nclients;
int y = 0;
int n = 0;
for (int i = 0;i < m->nclients;i++) { /* draw all clients into tabwin */
for (int i = 0; i < m->nclients; i++) {
c = m->clientsnext[i];
if(!ISVISIBLE(c)) continue;
if (HIDDEN(c)) continue;
n++;
drw_setscheme(drw, scheme[(c == m->sel) ? SchemeTitleSel : SchemeBar]);
drw_text(drw, 0, y, selmon->maxwidth, h, 0, c->name, 0, False);
#if USEWINICON
if (c->icon) drw_pic(drw, 0, y, selmon->maxwidth, h, c->icon);
#endif
y += h;
}