openIconTheme

Find index.theme file for given theme and create instance of icontheme.file.IconThemeFile. The first found file will be used.

Parameters

themeName string

Theme name (as the base name of theme subdirectory).

searchIconDirs Range

Base icon directories to search icon themes.

options IconThemeFile.IconThemeReadOptions

options for icontheme.file.IconThemeFile reading.

Return Value

icontheme.file.IconThemeFile object read from the first found index.theme file corresponding to given theme or null if none were found.

Throws

ErrnoException if file could not be opened. IniLikeException if error occured while reading the file.

Examples

auto tango = openIconTheme("Tango", ["test"]);
assert(tango);
assert(tango.displayName() == "Tango");

auto hicolor = openIconTheme("hicolor", ["test"]);
assert(hicolor);
assert(hicolor.displayName() == "Hicolor");

assert(openIconTheme("Nonexistent", ["test"]) is null);

See Also

findIconTheme, icontheme.paths.baseIconDirs

Meta