#icons #freedesktop #lookup #themes #directories #search #path

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

#657 in Filesystem

Download history 12/week @ 2024-01-07 11/week @ 2024-01-14 12/week @ 2024-01-21 19/week @ 2024-01-28 10/week @ 2024-02-04 3/week @ 2024-02-11 35/week @ 2024-02-18 47/week @ 2024-02-25 34/week @ 2024-03-03 111/week @ 2024-03-10 51/week @ 2024-03-17 38/week @ 2024-03-24 57/week @ 2024-03-31 42/week @ 2024-04-07 72/week @ 2024-04-14 23/week @ 2024-04-21

196 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.4–0.9MB
~20K SLoC