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 (2466B)
---
1 netwmicon
2 =========
3
4 Description
5 -----------
6 Enables to set \_NET\_WM\_ICON with a png-image.
7
8 Generally the icon of an application is defined by its desktop-entry. The patch
9 [desktopentry](../desktopentry) serves this purpose. Unfortunately, some
10 programs like [tint2](https://gitlab.com/o9000/tint2) or
11 [alttab](https://github.com/sagb/alttab) can't make use of the desktop-entry and
12 rely instead on a hardcoded icon which has to be defined by the application
13 itself with the window-propery \_NET\_WM\_ICON. Since st doesn't define
14 \_NET\_WM\_ICON this programs can't display the correct icon for st even if a
15 desktop-entry exists. This patch solves this problem.
16
17 Dependencies
18 ------------
19 - gd
20
21 Defining an icon
22 ----------------
23 By default each time st starts it will search for a file with the name *st.png*
24 under */usr/local/share/pixmaps/*. If you put an image with this name in the
25 root-directory of the st-repository and call `make install` the image will be
26 installed in */usr/local/share/pixmaps/* automatically. Otherwise you have to
27 put the file there manually. You can try it out with this icon [st.png](st.png)
28 (credit: [flat-remix](https://github.com/daniruiz/flat-remix)).
29
30 Using with desktopentry
31 -----------------------
32 If you use the [desktopentry](../desktopentry)-patch you should adjust the icon
33 in the file *st.desktop* by replacing the line `Icon=utilities-terminal` with
34 `Icon=st`.
35
36 Most programs which use the desktop-file to determine the icon should be able to
37 find *st.png* under */usr/local/share/pixmaps/*. If not report it to me and try
38 changing in *confing.mk* the line `ICONPREFIX = $(PREFIX)/share/pixmaps` to
39 `ICONPREFIX = $(PREFIX)/share/icons/hicolor/256x256/apps/` and install the icon
40 there.
41
42 Call to action
43 --------------
44 Maybe somebody would like to create an icon with the st-logo so we could add it
45 here instead of using the icon from flat-remix.
46
47 Credits
48 -------
49 The code for loading and transforming the image to an appropriate format is in
50 large part from [xseticon](https://www.leonerd.org.uk/code/xseticon/) which is
51 developed by Paul Evans.
52
53 Download
54 --------
55 * [st-netwmicon-0.8.5-v2.diff](st-netwmicon-0.8.5-v2.diff)
56 * [st-netwmicon-0.8.4.diff](st-netwmicon-0.8.4.diff) (Deprecated)
57 * [netwmicon.sh](netwmicon.sh) (Deprecated. Used for 0.8.4-patch. Look at
58 patch-description to understand how its supposed to work. It seems to distort
59 the icon.)
60
61 Authors
62 -------
63 * Aleksandrs Stier - <aleks.stier@icloud.com>