#icons #lookup #freedesktop #themes #directories

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

#10 in #icon

Download history 37/week @ 2024-07-22 34/week @ 2024-07-29 34/week @ 2024-08-05 30/week @ 2024-08-12 20/week @ 2024-08-19 33/week @ 2024-08-26 41/week @ 2024-09-02 37/week @ 2024-09-09 36/week @ 2024-09-16 63/week @ 2024-09-23 54/week @ 2024-09-30 24/week @ 2024-10-07 40/week @ 2024-10-14 23/week @ 2024-10-21 37/week @ 2024-10-28 44/week @ 2024-11-04

148 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