index.md - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
index.md (1983B)
---
1 winicon
2 ========
3
4 Description
5 -----------
6 **dwm-winicon** is a patch that enables dwm to show window icons.
7
8 
9
10 It is recommended to enable the compiler optimization flags: **-O3** and **-march=native** to enable auto loop vectorize, which leads to better performance.
11
12 The patch is being managed and developed on this GitHub [repo](https://github.com/AdamYuan/dwm-winicon). If you discover any bugs or have any idea to optimize it, feel free to create an issue there.
13
14 Dependency
15 ----------
16 The patch depends on Imlib2 for icon scaling, which can be easily installed in most distros.
17
18 Arch Linux:
19 sudo pacman -S imlib2
20 Debian:
21 sudo apt install libimlib2-dev
22
23 Configuration
24 -------------
25 #define ICONSIZE 20 /* icon size in pixels */
26 #define ICONSPACING 5 /* space (pixels) between icon and title */
27
28 There are also some practical macro hacks:
29 #define ICONSIZE bh /* make icon size equals to bar height */
30 #define ICONSIZE (bh - 4) /* or adaptively preserve 2 pixels each side */
31
32 Download
33 --------
34 * [dwm-winicon-6.3-v2.1.diff](dwm-winicon-6.3-v2.1.diff) (2022-02-26)
35 * [dwm-winicon-6.2-v2.1.diff](dwm-winicon-6.2-v2.1.diff) (2021-08-17)
36
37 Alpha Patch
38 -----------
39 If you also use [alpha patch](https://dwm.suckless.org/patches/alpha/), some modifications are needed to make dwm work correctly.
40 * Replace (in drw.c, drw_create function)
41 drw->picture = XRenderCreatePicture(dpy, drw->drawable, XRenderFindVisualFormat(dpy, DefaultVisual(dpy, screen)), 0, NULL);
42 with
43 drw->picture = XRenderCreatePicture(dpy, drw->drawable, XRenderFindVisualFormat(dpy, visual), 0, NULL);
44 * Replace (in drw.c, drw_resize function)
45 drw->picture = XRenderCreatePicture(drw->dpy, drw->drawable, XRenderFindVisualFormat(drw->dpy, DefaultVisual(drw->dpy, drw->screen)), 0, NULL);
46 with
47 drw->picture = XRenderCreatePicture(drw->dpy, drw->drawable, XRenderFindVisualFormat(drw->dpy, drw->visual), 0, NULL);
48
49 Author
50 ------
51 * Adam Yuan - `<y13916619121@126.com>`