#cache

freedesktop-icon-lookup

Freedesktop icons lookup

3 releases

0.1.3 Feb 2, 2024
0.1.2 Oct 29, 2023
0.1.1 Nov 11, 2022
0.1.0 Oct 10, 2022

#153 in #cache

Download history 30/week @ 2024-06-13 48/week @ 2024-06-20 22/week @ 2024-06-27 9/week @ 2024-07-04 31/week @ 2024-07-11 27/week @ 2024-07-18 44/week @ 2024-07-25 28/week @ 2024-08-01 35/week @ 2024-08-08 24/week @ 2024-08-15 23/week @ 2024-08-22 39/week @ 2024-08-29 41/week @ 2024-09-05 38/week @ 2024-09-12 46/week @ 2024-09-19 48/week @ 2024-09-26

177 downloads per month
Used in yofi

MIT license

21KB
498 lines

freedesktop-icon-lookup

A library for searching a path with given app name based on Freedesktop icon lookup spec. The implementation eagarly scans all directories in advance so multiple lookups are executed way faster and without real filesystem scan.

Feature list

  • Multiple themes support, including inherited;
  • Advanced lookup among all found

Example

use freedesktop_icon_lookup::{Cache, LookupParam};

let theme = "Adwaita";
let mut cache = Cache::new()?;
cache.load(theme)?;
let _: Option<PathBuf> = cache.lookup("firefox", theme);

Alternatives

freedesktop-icons might be a better option if you only need a few icons to search.

Dependencies

~0.3–0.8MB
~19K SLoC