Setting the NET_WM_ICON for Tkinter application windows


The icon created by the example program
This somewhat hackish module can be used to set the NET_WM_ICON for your Tkinter application. The included example.py file is, well, an example. You have to do the work of computing the value of the property, then pass the Tk toplevel window and the bytestring representation of the property to _tk_seticon.seticon().

Not all window managers support NET_WM_ICON; Metacity does in Fedora Core 2, while icewm 1.2.20 doesn't. It uses only the old WM_HINTS bitmap and mask.

Files currently attached to this page:

seticon-0.0.tar.gz2.7kB
seticon-example.png5.9kB



Entry first conceived on 31 March 2005, 2:55 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler