[][src]Crate linicon

Look up icons and icon theme info on Linux.

This library does not currently provide a way to get the user's currently selected icon theme. To the best of my knowledge this process is not standardized, and varies across DEs. I may attempt to add such a function in the future.

Examples

Find an icon for Wireshark from the Faenza theme.

let wireshark_icon = linicon::lookup_icon("Faenza", "wireshark", 64, 1)
    .unwrap()
    .next()
    .unwrap()
    .unwrap();
println!("{:?}", wireshark_icon);

Find all of the icons for Wireshark from the Faenza theme.

use linicon::lookup_icon;
let wireshark_icons: Vec<_> = lookup_icon("Faenza", "wireshark", 64, 1)
    .unwrap()
    .collect();
println!("{:#?}", wireshark_icons);

Structs

IconIter

An iterator over the icons that match the input parameters given to lookup_icon or lookup_icon_with_extra_paths

IconPath

A path to an icon and meta data about that icon

Theme

Metadata about a theme

Enums

IconType

The type of icon returned i.e. file type

Functions

lookup_icon

Lookup icons with by name, size, and scale in the given theme or one of its fallbacks.

lookup_icon_with_extra_paths

Works the same as lookup_icon expect you can provide a list of additional paths to the default list of paths in with to search for icon themes.

themes

Get metadata about installed themes.

themes_with_extra_paths

Get metadata about installed themes, with additional search paths.