sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (1913B)


      1 winicon
      2 ========
      3 
      4 Description
      5 -----------
      6 **dwm-winicon** is a patch that enables dwm to show window icons.
      7 
      8 ![screenshots](screenshots.png)
      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.2-v2.0.diff](dwm-winicon-6.2-v2.0.diff) (2021-08-17)
     35 
     36 Alpha Patch
     37 -----------
     38 If you also use [alpha patch](https://dwm.suckless.org/patches/alpha/), some modifications are needed to make dwm work correctly.
     39 * Replace (in drw.c, drw_create function)
     40 	drw->picture = XRenderCreatePicture(dpy, drw->drawable, XRenderFindVisualFormat(dpy, DefaultVisual(dpy, screen)), 0, NULL);
     41 with 
     42 	drw->picture = XRenderCreatePicture(dpy, drw->drawable, XRenderFindVisualFormat(dpy, visual), 0, NULL);
     43 * Replace (in drw.c, drw_resize function)
     44 	drw->picture = XRenderCreatePicture(drw->dpy, drw->drawable, XRenderFindVisualFormat(drw->dpy, DefaultVisual(drw->dpy, drw->screen)), 0, NULL);
     45 with 
     46 	drw->picture = XRenderCreatePicture(drw->dpy, drw->drawable, XRenderFindVisualFormat(drw->dpy, drw->visual), 0, NULL);
     47 
     48 Author
     49 ------
     50 * Adam Yuan - `<y13916619121@126.com>`