Icon Themes

XDG Icon Theme specification

xdg.IconTheme.getIconPath(iconname, size=None, theme=None, extensions=['png', 'svg', 'xpm'])[source]

Get the path to a specified icon.

size :
Icon size in pixels. Defaults to xdg.Config.icon_size.
theme :
Icon theme name. Defaults to xdg.Config.icon_theme. If the icon isn’t found in the specified theme, it will be looked up in the basic ‘hicolor’ theme.
extensions :
List of preferred file extensions.


>>> getIconPath("inkscape", 32)

Retrieve the data from the .icon file corresponding to the given file. If there is no .icon file, it returns None.


class xdg.IconTheme.IconData[source]

Class to parse and validate IconData Files


Retrieve the anchor points for overlays & emblems from the icon data, as a list of co-ordinate pairs, if they are specified.


Retrieve the display name from the icon data, if one is specified.


Retrieve the embedded text rectangle from the icon data as a list of numbers (x0, y0, x1, y1), if it is specified.